directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pamarce...@apache.org
Subject svn commit: r1141958 - in /directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api: GssApiRequest.java LdapNetworkConnection.java
Date Fri, 01 Jul 2011 15:08:44 GMT
Author: pamarcelot
Date: Fri Jul  1 15:08:43 2011
New Revision: 1141958

URL: http://svn.apache.org/viewvc?rev=1141958&view=rev
Log:
Fix for DIRSHARED-132 (Add additional GssApiRequest property).

Modified:
    directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/GssApiRequest.java
    directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java

Modified: directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/GssApiRequest.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/GssApiRequest.java?rev=1141958&r1=1141957&r2=1141958&view=diff
==============================================================================
--- directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/GssApiRequest.java
(original)
+++ directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/GssApiRequest.java
Fri Jul  1 15:08:43 2011
@@ -42,7 +42,10 @@ public class GssApiRequest extends SaslR
     /** The krb5.conf file absolute path */
     protected String krb5ConfFilePath;
 
-    /** The {@link javax.security.auth.login.Configuration} object for Login Module */
+    /** The name for the {@link javax.security.auth.login.LoginContext} object */
+    protected String loginContextName = "ldapnetworkconnection";
+
+    /** The {@link javax.security.auth.login.Configuration} object for LoginModule */
     protected Configuration loginModuleConfiguration;
 
 
@@ -56,17 +59,6 @@ public class GssApiRequest extends SaslR
 
 
     /**
-     * Gets the {@link javax.security.auth.login.Configuration} object for Login Module.
-     *
-     * @return the {@link javax.security.auth.login.Configuration} object for Login Module
-     */
-    public Configuration getLoginModuleConfiguration()
-    {
-        return loginModuleConfiguration;
-    }
-
-
-    /**
      * Gets the KDC host.
      *
      * @return the KDC host
@@ -100,13 +92,24 @@ public class GssApiRequest extends SaslR
 
 
     /**
-     * Sets the {@link javax.security.auth.login.Configuration} object for Login Module.
+     * Gets the name for the {@link javax.security.auth.login.LoginContext} object. 
+     * 
+     * @return the name for the {@link javax.security.auth.login.LoginContext} object
+     */
+    public String getLoginContextName()
+    {
+        return loginContextName;
+    }
+
+
+    /**
+     * Gets the {@link javax.security.auth.login.Configuration} object for Login Module.
      *
-     * @param loginModuleConfiguration the {@link javax.security.auth.login.Configuration}
object for Login Module
+     * @return the {@link javax.security.auth.login.Configuration} object for Login Module
      */
-    public void setLoginModuleConfiguration( Configuration loginModuleConfiguration )
+    public Configuration getLoginModuleConfiguration()
     {
-        this.loginModuleConfiguration = loginModuleConfiguration;
+        return loginModuleConfiguration;
     }
 
 
@@ -144,6 +147,28 @@ public class GssApiRequest extends SaslR
 
 
     /**
+     * Sets the name for the {@link javax.security.auth.login.LoginContext} object.
+     * 
+     * @param loginContextName the name for the {@link javax.security.auth.login.LoginContext}
object
+     */
+    public void setLoginContextName( String loginContextName )
+    {
+        this.loginContextName = loginContextName;
+    }
+
+
+    /**
+     * Sets the {@link javax.security.auth.login.Configuration} object for Login Module.
+     *
+     * @param loginModuleConfiguration the {@link javax.security.auth.login.Configuration}
object for Login Module
+     */
+    public void setLoginModuleConfiguration( Configuration loginModuleConfiguration )
+    {
+        this.loginModuleConfiguration = loginModuleConfiguration;
+    }
+
+
+    /**
      * {@inheritDoc}
      */
     // Overriding the visibility of the method to public

Modified: directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
URL: http://svn.apache.org/viewvc/directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java?rev=1141958&r1=1141957&r2=1141958&view=diff
==============================================================================
--- directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
(original)
+++ directory/shared/trunk/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
Fri Jul  1 15:08:43 2011
@@ -1562,7 +1562,7 @@ public class LdapNetworkConnection exten
         try
         {
             System.setProperty( "javax.security.auth.useSubjectCredsOnly", "true" );
-            LoginContext loginContext = new LoginContext( "ldapnetworkconnection",
+            LoginContext loginContext = new LoginContext( request.getLoginContextName(),
                                     new SaslCallbackHandler( request ) );
             loginContext.login();
 
@@ -3658,8 +3658,8 @@ public class LdapNetworkConnection exten
                     {
                         return !Strings.isEmpty( id ) && id.endsWith( ";binary" );
                     }
-                }
-            } );
+                    }
+                } );
 
         session.setAttribute( "messageContainer", ldapMessageContainer );
     }



Mime
View raw message