Refactor JCR utils and home usage
[lgpl/argeo-commons.git] / security / runtime / org.argeo.security.ldap / src / main / java / org / argeo / security / ldap / jcr / JcrUserDetailsContextMapper.java
index 1db81167d521c4a851f3de1a28f5dcd6882f8c2b..72c120728354e660c2e7edf9d1fb9937e85a23f2 100644 (file)
@@ -23,6 +23,7 @@ import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 
 import org.argeo.ArgeoException;
+import org.argeo.jcr.ArgeoJcrUtils;
 import org.argeo.jcr.ArgeoNames;
 import org.argeo.jcr.JcrUtils;
 import org.argeo.security.jcr.JcrUserDetails;
@@ -32,7 +33,8 @@ import org.springframework.security.GrantedAuthority;
 import org.springframework.security.userdetails.UserDetails;
 import org.springframework.security.userdetails.ldap.UserDetailsContextMapper;
 
-/** Read only mapping from LDAP to user details */
+/** @deprecated Read only mapping from LDAP to user details */
+@Deprecated
 public class JcrUserDetailsContextMapper implements UserDetailsContextMapper,
                ArgeoNames {
        /** Admin session on the security workspace */
@@ -59,7 +61,7 @@ public class JcrUserDetailsContextMapper implements UserDetailsContextMapper,
                        final String username, GrantedAuthority[] authorities) {
                if (ctx == null)
                        throw new ArgeoException("No LDAP information for user " + username);
-               Node userHome = JcrUtils.getUserHome(securitySession, username);
+               Node userHome = ArgeoJcrUtils.getUserHome(securitySession, username);
                if (userHome == null)
                        throw new ArgeoException("No JCR information for user " + username);