cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1172567 - in /cxf/branches/2.4.x-fixes: rt/ws/security/src/main/java/org/apache/cxf/ws/security/kerberos/KerberosClient.java systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/kerberos/client/client.xml
Date Mon, 19 Sep 2011 10:59:16 GMT
Author: coheigea
Date: Mon Sep 19 10:59:16 2011
New Revision: 1172567

URL: http://svn.apache.org/viewvc?rev=1172567&view=rev
Log:
[CXF-3807] - Patch applied to use contextName for the KerberosClient

Modified:
    cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/kerberos/KerberosClient.java
    cxf/branches/2.4.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/kerberos/client/client.xml

Modified: cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/kerberos/KerberosClient.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/kerberos/KerberosClient.java?rev=1172567&r1=1172566&r2=1172567&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/kerberos/KerberosClient.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/ws/security/src/main/java/org/apache/cxf/ws/security/kerberos/KerberosClient.java
Mon Sep 19 10:59:16 2011
@@ -46,7 +46,7 @@ public class KerberosClient implements C
     
     private String serviceName;
     private CallbackHandler callbackHandler;
-    private String jaasLoginModuleName;
+    private String contextName;
     private WSSConfig wssConfig = WSSConfig.getNewInstance();
     
     public KerberosClient(Bus b) {
@@ -58,19 +58,37 @@ public class KerberosClient implements C
     }
     
     /**
+     * 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;
     }
 
     /**
@@ -108,10 +126,10 @@ public class KerberosClient implements C
     public SecurityToken requestSecurityToken() throws Exception {
         if (LOG.isLoggable(Level.FINE)) {
             LOG.fine("Requesting Kerberos ticket for " + serviceName 
-                    + " using JAAS Login Module: " + jaasLoginModuleName);
+                    + " using JAAS Login Module: " + getContextName());
         }
         KerberosSecurity bst = new KerberosSecurity(DOMUtils.createDocument());
-        bst.retrieveServiceTicket(jaasLoginModuleName, callbackHandler, serviceName);
+        bst.retrieveServiceTicket(getContextName(), callbackHandler, serviceName);
         bst.addWSUNamespace();
         bst.setID(wssConfig.getIdAllocator().createSecureId("BST-", bst));
         

Modified: cxf/branches/2.4.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/kerberos/client/client.xml
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/kerberos/client/client.xml?rev=1172567&r1=1172566&r2=1172567&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/kerberos/client/client.xml
(original)
+++ cxf/branches/2.4.x-fixes/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/kerberos/client/client.xml
Mon Sep 19 10:59:16 2011
@@ -58,7 +58,7 @@
            <entry key="ws-security.kerberos.client">
                <bean class="org.apache.cxf.ws.security.kerberos.KerberosClient">
                    <constructor-arg ref="cxf"/>
-                   <property name="jaasLoginModuleName" value="alice"/>
+                   <property name="contextName" value="alice"/>
                    <property name="serviceName" value="bob@service.ws.apache.org"/>
                </bean>            
            </entry> 
@@ -74,7 +74,7 @@
            <entry key="ws-security.kerberos.client">
                <bean class="org.apache.cxf.ws.security.kerberos.KerberosClient">
                    <constructor-arg ref="cxf"/>
-                   <property name="jaasLoginModuleName" value="alice"/>
+                   <property name="contextName" value="alice"/>
                    <property name="serviceName" value="bob@service.ws.apache.org"/>
                </bean>            
            </entry> 
@@ -90,7 +90,7 @@
            <entry key="ws-security.kerberos.client">
                <bean class="org.apache.cxf.ws.security.kerberos.KerberosClient">
                    <constructor-arg ref="cxf"/>
-                   <property name="jaasLoginModuleName" value="alice"/>
+                   <property name="contextName" value="alice"/>
                    <property name="serviceName" value="bob@service.ws.apache.org"/>
                </bean>            
            </entry> 
@@ -111,7 +111,7 @@
            <entry key="ws-security.kerberos.client">
                <bean class="org.apache.cxf.ws.security.kerberos.KerberosClient">
                    <constructor-arg ref="cxf"/>
-                   <property name="jaasLoginModuleName" value="alice"/>
+                   <property name="contextName" value="alice"/>
                    <property name="serviceName" value="bob@service.ws.apache.org"/>
                </bean>            
            </entry> 
@@ -124,7 +124,7 @@
            <entry key="ws-security.kerberos.client">
                <bean class="org.apache.cxf.ws.security.kerberos.KerberosClient">
                    <constructor-arg ref="cxf"/>
-                   <property name="jaasLoginModuleName" value="alice"/>
+                   <property name="contextName" value="alice"/>
                    <property name="serviceName" value="bob@service.ws.apache.org"/>
                </bean>            
            </entry> 
@@ -145,7 +145,7 @@
            <entry key="ws-security.kerberos.client">
                <bean class="org.apache.cxf.ws.security.kerberos.KerberosClient">
                    <constructor-arg ref="cxf"/>
-                   <property name="jaasLoginModuleName" value="alice"/>
+                   <property name="contextName" value="alice"/>
                    <property name="serviceName" value="bob@service.ws.apache.org"/>
                </bean>            
            </entry> 
@@ -161,7 +161,7 @@
            <entry key="ws-security.kerberos.client">
                <bean class="org.apache.cxf.ws.security.kerberos.KerberosClient">
                    <constructor-arg ref="cxf"/>
-                   <property name="jaasLoginModuleName" value="alice"/>
+                   <property name="contextName" value="alice"/>
                    <property name="serviceName" value="bob@service.ws.apache.org"/>
                </bean>            
            </entry> 
@@ -177,7 +177,7 @@
            <entry key="ws-security.kerberos.client">
                <bean class="org.apache.cxf.ws.security.kerberos.KerberosClient">
                    <constructor-arg ref="cxf"/>
-                   <property name="jaasLoginModuleName" value="alice"/>
+                   <property name="contextName" value="alice"/>
                    <property name="serviceName" value="bob@service.ws.apache.org"/>
                </bean>            
            </entry> 



Mime
View raw message