You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2008/08/05 18:02:29 UTC
svn commit: r682768 -
/directory/apacheds/branches/bigbang/protocol-newldap/src/main/java/org/apache/directory/server/newldap/handlers/bind/ntlm/NtlmMechanismHandler.java
Author: elecharny
Date: Tue Aug 5 09:02:28 2008
New Revision: 682768
URL: http://svn.apache.org/viewvc?rev=682768&view=rev
Log:
Added a init and cleanup method in the MechanismHandler, so that those methods are directly related to the underlying mechanism. (forgot to commit this class ...)
Modified:
directory/apacheds/branches/bigbang/protocol-newldap/src/main/java/org/apache/directory/server/newldap/handlers/bind/ntlm/NtlmMechanismHandler.java
Modified: directory/apacheds/branches/bigbang/protocol-newldap/src/main/java/org/apache/directory/server/newldap/handlers/bind/ntlm/NtlmMechanismHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/protocol-newldap/src/main/java/org/apache/directory/server/newldap/handlers/bind/ntlm/NtlmMechanismHandler.java?rev=682768&r1=682767&r2=682768&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/protocol-newldap/src/main/java/org/apache/directory/server/newldap/handlers/bind/ntlm/NtlmMechanismHandler.java (original)
+++ directory/apacheds/branches/bigbang/protocol-newldap/src/main/java/org/apache/directory/server/newldap/handlers/bind/ntlm/NtlmMechanismHandler.java Tue Aug 5 09:02:28 2008
@@ -78,4 +78,29 @@
{
provider = ( NtlmProvider ) Class.forName( providerFqcn ).newInstance();
}
+
+
+ /**
+ * {@inheritDoc}
+ */
+ public void init( LdapSession ldapSession )
+ {
+ // Store the host in the ldap session
+ String saslHost = ldapSession.getLdapServer().getSaslHost();
+ ldapSession.putSaslProperty( SaslConstants.SASL_HOST, saslHost );
+ }
+
+
+ /**
+ * Remove the Host, UserBaseDn, props and Mechanism property.
+ *
+ * @param ldapSession the LdapSession instance
+ */
+ public void cleanup( LdapSession ldapSession )
+ {
+ ldapSession.removeSaslProperty( SaslConstants.SASL_HOST );
+ ldapSession.removeSaslProperty( SaslConstants.SASL_USER_BASE_DN );
+ ldapSession.removeSaslProperty( SaslConstants.SASL_MECH );
+ ldapSession.removeSaslProperty( SaslConstants.SASL_PROPS );
+ }
}
\ No newline at end of file