cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1364007 - /cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/security/JAASLoginInterceptor.java
Date Fri, 20 Jul 2012 22:49:30 GMT
Author: sergeyb
Date: Fri Jul 20 22:49:30 2012
New Revision: 1364007

URL: http://svn.apache.org/viewvc?rev=1364007&view=rev
Log:
forgetting to commit one more update

Modified:
    cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/security/JAASLoginInterceptor.java

Modified: cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/security/JAASLoginInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/security/JAASLoginInterceptor.java?rev=1364007&r1=1364006&r2=1364007&view=diff
==============================================================================
--- cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/security/JAASLoginInterceptor.java
(original)
+++ cxf/trunk/rt/core/src/main/java/org/apache/cxf/interceptor/security/JAASLoginInterceptor.java
Fri Jul 20 22:49:30 2012
@@ -23,6 +23,7 @@ import java.util.logging.Logger;
 
 import javax.security.auth.Subject;
 import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.login.Configuration;
 import javax.security.auth.login.LoginContext;
 import javax.security.auth.login.LoginException;
 
@@ -45,11 +46,13 @@ public class JAASLoginInterceptor extend
     private static final ResourceBundle BUNDLE = BundleUtils.getBundle(JAASLoginInterceptor.class);
     private static final Logger LOG = LogUtils.getL7dLogger(JAASLoginInterceptor.class);
     
-    private String contextName;
+    private String contextName = "";
+    private Configuration loginConfig;
     private String roleClassifier;
     private String roleClassifierType = ROLE_CLASSIFIER_PREFIX;
     private boolean reportFault;
     
+    
     public JAASLoginInterceptor() {
         super(Phase.UNMARSHAL);
     }
@@ -128,8 +131,11 @@ public class JAASLoginInterceptor extend
         }
         
         try {
+            
+            
             CallbackHandler handler = getCallbackHandler(name, password);  
-            LoginContext ctx = new LoginContext(getContextName(), handler);  
+            LoginContext ctx = new LoginContext(getContextName(), null, handler, loginConfig);
 
+            
             ctx.login();
             
             Subject subject = ctx.getSubject();
@@ -158,6 +164,14 @@ public class JAASLoginInterceptor extend
             return new DefaultSecurityContext(subject);
         }
     }
+
+    public Configuration getLoginConfig() {
+        return loginConfig;
+    }
+
+    public void setLoginConfig(Configuration loginConfig) {
+        this.loginConfig = loginConfig;
+    }
     
     
 }



Mime
View raw message