]> git.argeo.org Git - lgpl/argeo-commons.git/blobdiff - security/runtime/org.argeo.security.ldap/src/main/java/org/argeo/security/ldap/jcr/JcrUserDetailsContextMapper.java
Make ldap to jcr synchronized in order to avoid error when parallel authentications
[lgpl/argeo-commons.git] / security / runtime / org.argeo.security.ldap / src / main / java / org / argeo / security / ldap / jcr / JcrUserDetailsContextMapper.java
index 537e01763c8a0507bdd4c8e60236b212694cb6c1..8cac6a7097a7f699ae3d585c7cbba87c2b9d586d 100644 (file)
@@ -108,7 +108,7 @@ public class JcrUserDetailsContextMapper implements UserDetailsContextMapper,
        }
 
        /** @return path to the user home node */
-       protected String mapLdapToJcr(String username, DirContextOperations ctx) {
+       protected synchronized String mapLdapToJcr(String username, DirContextOperations ctx) {
                String usernameLdap = ctx.getStringAttribute(usernameAttribute);
                // log.debug("username=" + username + ", usernameLdap=" + usernameLdap);
                if (!username.equals(usernameLdap)) {