directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1483780 - /directory/apacheds/trunk/interceptors/authn/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
Date Fri, 17 May 2013 13:00:17 GMT
Author: elecharny
Date: Fri May 17 13:00:17 2013
New Revision: 1483780

URL: http://svn.apache.org/r1483780
Log:
o Removed the authenticator cache invalidation for a compare operation
o Improved the cache for modification (we only invalidate it when the userPassword is being
modified)

Modified:
    directory/apacheds/trunk/interceptors/authn/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java

Modified: directory/apacheds/trunk/interceptors/authn/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/interceptors/authn/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java?rev=1483780&r1=1483779&r2=1483780&view=diff
==============================================================================
--- directory/apacheds/trunk/interceptors/authn/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
(original)
+++ directory/apacheds/trunk/interceptors/authn/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
Fri May 17 13:00:17 2013
@@ -730,7 +730,6 @@ public class AuthenticationInterceptor e
         checkAuthenticated( compareContext );
         checkPwdReset( compareContext );
         boolean result = next( compareContext );
-        invalidateAuthenticatorCaches( compareContext.getDn() );
 
         return result;
     }
@@ -834,7 +833,18 @@ public class AuthenticationInterceptor e
         if ( !directoryService.isPwdPolicyEnabled() || modifyContext.isReplEvent() )
         {
             next( modifyContext );
-            invalidateAuthenticatorCaches( modifyContext.getDn() );
+
+            List<Modification> modifications = modifyContext.getModItems();
+
+            for ( Modification modification : modifications )
+            {
+                if ( USER_PASSWORD_AT.equals( modification.getAttribute().getAttributeType()
) )
+                {
+                    invalidateAuthenticatorCaches( modifyContext.getDn() );
+                    break;
+                }
+            }
+
             return;
         }
 



Mime
View raw message