ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1171468 - in /webservices/wss4j/trunk/src: main/java/org/apache/ws/security/validate/KerberosTokenValidator.java test/java/org/apache/ws/security/message/token/KerberosTest.java
Date Fri, 16 Sep 2011 09:25:02 GMT
Author: coheigea
Date: Fri Sep 16 09:25:02 2011
New Revision: 1171468

URL: http://svn.apache.org/viewvc?rev=1171468&view=rev
Log:
[WSS-315] - Patch applied, thanks

Modified:
    webservices/wss4j/trunk/src/main/java/org/apache/ws/security/validate/KerberosTokenValidator.java
    webservices/wss4j/trunk/src/test/java/org/apache/ws/security/message/token/KerberosTest.java

Modified: webservices/wss4j/trunk/src/main/java/org/apache/ws/security/validate/KerberosTokenValidator.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/main/java/org/apache/ws/security/validate/KerberosTokenValidator.java?rev=1171468&r1=1171467&r2=1171468&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/main/java/org/apache/ws/security/validate/KerberosTokenValidator.java
(original)
+++ webservices/wss4j/trunk/src/main/java/org/apache/ws/security/validate/KerberosTokenValidator.java
Fri Sep 16 09:25:02 2011
@@ -43,22 +43,40 @@ public class KerberosTokenValidator impl
     
     private String serviceName;
     private CallbackHandler callbackHandler;
-    private String jaasLoginModuleName;
+    private String contextName;
     
     /**
+     * Get the JAAS Login context name to use.
+     * @return the JAAS Login context name to use
+     */
+    public String getContextName() {
+        return contextName;
+    }
+
+    /**
+     * Set the JAAS Login context name to use.
+     * @param contextName the JAAS Login context name to use
+     */
+    public void setContextName(String contextName) {
+        this.contextName = contextName;
+    }
+    
+    /**
+     * @deprecated
      * Get the JAAS Login module name to use.
      * @return the JAAS Login module name to use
      */
     public String getJaasLoginModuleName() {
-        return jaasLoginModuleName;
+        return contextName;
     }
 
     /**
+     * @deprecated
      * Set the JAAS Login module name to use.
      * @param jaasLoginModuleName the JAAS Login module name to use
      */
     public void setJaasLoginModuleName(String jaasLoginModuleName) {
-        this.jaasLoginModuleName = jaasLoginModuleName;
+        this.contextName = jaasLoginModuleName;
     }
 
     /**
@@ -127,9 +145,9 @@ public class KerberosTokenValidator impl
         LoginContext loginContext = null;
         try {
             if (callbackHandler == null) {
-                loginContext = new LoginContext(jaasLoginModuleName);
+                loginContext = new LoginContext(getContextName());
             } else {
-                loginContext = new LoginContext(jaasLoginModuleName, callbackHandler);
+                loginContext = new LoginContext(getContextName(), callbackHandler);
             }
             loginContext.login();
         } catch (LoginException ex) {

Modified: webservices/wss4j/trunk/src/test/java/org/apache/ws/security/message/token/KerberosTest.java
URL: http://svn.apache.org/viewvc/webservices/wss4j/trunk/src/test/java/org/apache/ws/security/message/token/KerberosTest.java?rev=1171468&r1=1171467&r2=1171468&view=diff
==============================================================================
--- webservices/wss4j/trunk/src/test/java/org/apache/ws/security/message/token/KerberosTest.java
(original)
+++ webservices/wss4j/trunk/src/test/java/org/apache/ws/security/message/token/KerberosTest.java
Fri Sep 16 09:25:02 2011
@@ -85,7 +85,7 @@ public class KerberosTest extends org.ju
         // Configure the Validator
         WSSConfig wssConfig = WSSConfig.getNewInstance();
         KerberosTokenValidator validator = new KerberosTokenValidator();
-        validator.setJaasLoginModuleName("bob");
+        validator.setContextName("bob");
         validator.setServiceName("bob@service.ws.apache.org");
         wssConfig.setValidator(WSSecurityEngine.BINARY_TOKEN, validator);
         WSSecurityEngine secEngine = new WSSecurityEngine();
@@ -168,7 +168,7 @@ public class KerberosTest extends org.ju
         // Configure the Validator
         WSSConfig wssConfig = WSSConfig.getNewInstance();
         KerberosTokenValidator validator = new KerberosTokenValidator();
-        validator.setJaasLoginModuleName("bob");
+        validator.setContextName("bob");
         validator.setServiceName("bob@service.ws.apache.org");
         wssConfig.setValidator(WSSecurityEngine.BINARY_TOKEN, validator);
         WSSecurityEngine secEngine = new WSSecurityEngine();
@@ -229,7 +229,7 @@ public class KerberosTest extends org.ju
         // Configure the Validator
         WSSConfig wssConfig = WSSConfig.getNewInstance();
         KerberosTokenValidator validator = new KerberosTokenValidator();
-        validator.setJaasLoginModuleName("bob");
+        validator.setContextName("bob");
         validator.setServiceName("bob@service.ws.apache.org");
         wssConfig.setValidator(WSSecurityEngine.BINARY_TOKEN, validator);
         WSSecurityEngine secEngine = new WSSecurityEngine();
@@ -285,7 +285,7 @@ public class KerberosTest extends org.ju
         // Configure the Validator
         WSSConfig wssConfig = WSSConfig.getNewInstance();
         KerberosTokenValidator validator = new KerberosTokenValidator();
-        validator.setJaasLoginModuleName("bob");
+        validator.setContextName("bob");
         validator.setServiceName("bob@service.ws.apache.org");
         wssConfig.setValidator(WSSecurityEngine.BINARY_TOKEN, validator);
         WSSecurityEngine secEngine = new WSSecurityEngine();
@@ -341,7 +341,7 @@ public class KerberosTest extends org.ju
         // Configure the Validator
         WSSConfig wssConfig = WSSConfig.getNewInstance();
         KerberosTokenValidator validator = new KerberosTokenValidator();
-        validator.setJaasLoginModuleName("bob");
+        validator.setContextName("bob");
         validator.setServiceName("bob@service.ws.apache.org");
         wssConfig.setValidator(WSSecurityEngine.BINARY_TOKEN, validator);
         WSSecurityEngine secEngine = new WSSecurityEngine();
@@ -399,7 +399,7 @@ public class KerberosTest extends org.ju
         // Configure the Validator
         WSSConfig wssConfig = WSSConfig.getNewInstance();
         KerberosTokenValidator validator = new KerberosTokenValidator();
-        validator.setJaasLoginModuleName("bob");
+        validator.setContextName("bob");
         validator.setServiceName("bob@service.ws.apache.org");
         wssConfig.setValidator(WSSecurityEngine.BINARY_TOKEN, validator);
         WSSecurityEngine secEngine = new WSSecurityEngine();



Mime
View raw message