|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.cms.security.MgnlUserManager
public class MgnlUserManager
Manages the users stored in Magnolia itself.
Field Summary | |
---|---|
static String |
NODE_ACLUSERS
|
static String |
PROPERTY_EMAIL
|
static String |
PROPERTY_LANGUAGE
|
static String |
PROPERTY_LASTACCESS
|
static String |
PROPERTY_PASSWORD
|
static String |
PROPERTY_TITLE
|
Fields inherited from interface info.magnolia.cms.security.UserManager |
---|
ANONYMOUS_USER, SYSTEM_PSWD, SYSTEM_USER |
Constructor Summary | |
---|---|
MgnlUserManager()
Do not instantiate it! |
Method Summary | |
---|---|
void |
changePassword(User user,
String newPassword)
Sets a new password. |
User |
createUser(String name,
String pw)
Creates a user without security restrictions. |
protected Content |
createUserNode(String name)
|
protected String |
encodePassword(String clearPassword)
|
protected Content |
findUserNode(String realm,
String name)
Helper method to find a user in a certain realm. |
Collection<User> |
getAllUsers()
Get all users managed by this user manager. |
User |
getAnonymousUser()
SystemUserManager does this. |
protected User |
getFromRepository(String name)
|
protected HierarchyManager |
getHierarchyManager()
Return the HierarchyManager for the user workspace (through the system context). |
long |
getLockTimePeriod()
Gets a time in minutes for which account will be locked out in case of reaching maximum count of failed login attempts. |
int |
getMaxFailedLoginAttempts()
Gets a number of failed attempts before locking account. |
String |
getName()
|
String |
getRealmName()
|
User |
getSystemUser()
SystemUserManager does this. |
User |
getUser(String name)
Get the user object. |
User |
getUser(Subject subject)
Initialize new user using JAAS authenticated/authorized subject. |
protected User |
newUserInstance(Content node)
Creates a MgnlUser out of a jcr node. |
void |
setLockTimePeriod(long lockTimePeriod)
Sets a time in minutes for which account will be locked out in case of reaching maximum count of failed login attempts. |
void |
setMaxFailedLoginAttempts(int maxFailedLoginAttempts)
Sets a number of failed attempts before locking account. |
void |
setName(String name)
|
protected void |
setPasswordProperty(Content userNode,
String clearPassword)
|
void |
updateUserListWithAllChildren(Content node,
Collection<User> users)
Updates collection with all users located under provided node. |
protected MgnlUser |
userInstance(Content node)
Deprecated. since 4.3.1 - use newUserInstance(info.magnolia.cms.core.Content) |
protected void |
validateUsername(String name)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String PROPERTY_EMAIL
public static final String PROPERTY_LANGUAGE
public static final String PROPERTY_LASTACCESS
public static final String PROPERTY_PASSWORD
public static final String PROPERTY_TITLE
public static final String NODE_ACLUSERS
Constructor Detail |
---|
public MgnlUserManager()
Method Detail |
---|
public String getName()
public void setName(String name)
public String getRealmName()
public void setMaxFailedLoginAttempts(int maxFailedLoginAttempts)
UserManager
setMaxFailedLoginAttempts
in interface UserManager
public int getMaxFailedLoginAttempts()
UserManager
getMaxFailedLoginAttempts
in interface UserManager
public void setLockTimePeriod(long lockTimePeriod)
UserManager
setLockTimePeriod
in interface UserManager
public long getLockTimePeriod()
UserManager
getLockTimePeriod
in interface UserManager
public User getUser(String name)
getUser
in interface UserManager
name
-
public User getUser(Subject subject) throws UnsupportedOperationException
UserManager
getUser
in interface UserManager
UnsupportedOperationException
- if the current implementation doesn't support this operationprotected User getFromRepository(String name) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
protected Content findUserNode(String realm, String name) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public User getSystemUser() throws UnsupportedOperationException
getSystemUser
in interface UserManager
UnsupportedOperationException
- if the current implementation doesn't support this operationpublic User getAnonymousUser() throws UnsupportedOperationException
getAnonymousUser
in interface UserManager
UnsupportedOperationException
- if the current implementation doesn't support this operationpublic Collection<User> getAllUsers()
getAllUsers
in interface UserManager
public void updateUserListWithAllChildren(Content node, Collection<User> users)
public User createUser(String name, String pw)
UserManager
createUser
in interface UserManager
public void changePassword(User user, String newPassword)
UserManager
changePassword
in interface UserManager
protected void setPasswordProperty(Content userNode, String clearPassword) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
protected String encodePassword(String clearPassword)
protected void validateUsername(String name)
protected Content createUserNode(String name) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
protected HierarchyManager getHierarchyManager()
protected MgnlUser userInstance(Content node)
newUserInstance(info.magnolia.cms.core.Content)
protected User newUserInstance(Content node)
MgnlUser
out of a jcr node. Can be overridden in order to provide a different implementation.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |