]> 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
Bind-only LDAP security DAO, without user management
[lgpl/argeo-commons.git] / security / runtime / org.argeo.security.ldap / src / main / java / org / argeo / security / ldap / jcr / JcrUserDetailsContextMapper.java
index 1db81167d521c4a851f3de1a28f5dcd6882f8c2b..87973d9bdb2e37dfe023a14dca2af0fbc2c7f583 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2012 Mathieu Baudier
+ * Copyright (C) 2007-2012 Argeo GmbH
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -25,6 +25,7 @@ import javax.jcr.Session;
 import org.argeo.ArgeoException;
 import org.argeo.jcr.ArgeoNames;
 import org.argeo.jcr.JcrUtils;
+import org.argeo.jcr.UserJcrUtils;
 import org.argeo.security.jcr.JcrUserDetails;
 import org.springframework.ldap.core.DirContextAdapter;
 import org.springframework.ldap.core.DirContextOperations;
@@ -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 = UserJcrUtils.getUserHome(securitySession, username);
                if (userHome == null)
                        throw new ArgeoException("No JCR information for user " + username);