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 2013/05/17 15:00:17 UTC
svn commit: r1483780 -
/directory/apacheds/trunk/interceptors/authn/src/main/java/org/apache/directory/server/core/authn/AuthenticationInterceptor.java
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;
}