directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1332204 - /directory/apacheds/branches/index-work/interceptors/authn/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
Date Mon, 30 Apr 2012 13:51:15 GMT
Author: elecharny
Date: Mon Apr 30 13:51:14 2012
New Revision: 1332204

URL: http://svn.apache.org/viewvc?rev=1332204&view=rev
Log:
used the Dn normalized name for the pwdResetSet, in order to speed up teh retrieval of Dn
in this set.

Modified:
    directory/apacheds/branches/index-work/interceptors/authn/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java

Modified: directory/apacheds/branches/index-work/interceptors/authn/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/index-work/interceptors/authn/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java?rev=1332204&r1=1332203&r2=1332204&view=diff
==============================================================================
--- directory/apacheds/branches/index-work/interceptors/authn/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
(original)
+++ directory/apacheds/branches/index-work/interceptors/authn/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
Mon Apr 30 13:51:14 2012
@@ -122,7 +122,7 @@ public class AuthenticationInterceptor e
 
     private CoreSession adminSession;
 
-    private Set<Dn> pwdResetSet = new HashSet<Dn>();
+    private Set<String> pwdResetSet = new HashSet<String>();
 
     // pwdpolicy state attribute types
     private AttributeType AT_PWD_RESET;
@@ -668,7 +668,7 @@ public class AuthenticationInterceptor e
                 if ( isPwdMustReset( userEntry ) )
                 {
                     pwdRespCtrl.getResponse().setPasswordPolicyError( PasswordPolicyErrorEnum.CHANGE_AFTER_RESET
);
-                    pwdResetSet.add( dn );
+                    pwdResetSet.add( dn.getNormName() );
                 }
 
                 bindContext.addResponseControl( pwdRespCtrl );
@@ -827,7 +827,7 @@ public class AuthenticationInterceptor e
 
         if ( pwdModDetails.isPwdModPresent() )
         {
-            if ( pwdResetSet.contains( userDn ) )
+            if ( pwdResetSet.contains( userDn.getNormName() ) )
             {
                 if ( pwdModDetails.isOtherModExists() )
                 {
@@ -1042,7 +1042,7 @@ public class AuthenticationInterceptor e
 
             if ( removeFromPwdResetSet )
             {
-                pwdResetSet.remove( userDn );
+                pwdResetSet.remove( userDn.getNormName() );
             }
         }
         else
@@ -1133,7 +1133,7 @@ public class AuthenticationInterceptor e
         // cause that requires fetching the ppolicy first, which requires a lookup for user
entry
         if ( !directoryService.isPwdPolicyEnabled() )
         {
-            pwdResetSet.remove( unbindContext.getDn() );
+            pwdResetSet.remove( unbindContext.getDn().getNormName() );
         }
     }
 
@@ -1402,7 +1402,7 @@ public class AuthenticationInterceptor e
 
             Dn userDn = session.getAuthenticatedPrincipal().getDn();
 
-            if ( pwdResetSet.contains( userDn ) )
+            if ( pwdResetSet.contains( userDn.getNormName() ) )
             {
                 boolean isPPolicyReqCtrlPresent = opContext
                     .hasRequestControl( PasswordPolicy.OID );



Mime
View raw message