|
||||||||||
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 java.lang.String |
NODE_ACLUSERS
|
static java.lang.String |
PROPERTY_EMAIL
|
static java.lang.String |
PROPERTY_LANGUAGE
|
static java.lang.String |
PROPERTY_LASTACCESS
|
static java.lang.String |
PROPERTY_PASSWORD
|
static java.lang.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,
java.lang.String newPassword)
Sets a new password. |
User |
createUser(java.lang.String name,
java.lang.String pw)
Creates a user without security restrictions. |
protected Content |
createUserNode(java.lang.String name)
|
protected java.lang.String |
encodePassword(java.lang.String clearPassword)
|
protected Content |
findUserNode(java.lang.String realm,
java.lang.String name)
Helper method to find a user in a certain realm. |
java.util.Collection<User> |
getAllUsers()
Get all users managed by this user manager. |
User |
getAnonymousUser()
SystemUserManager does this. |
protected User |
getFromRepository(java.lang.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. |
java.lang.String |
getName()
|
java.lang.String |
getRealmName()
|
User |
getSystemUser()
SystemUserManager does this. |
User |
getUser(java.lang.String name)
Get the user object. |
User |
getUser(javax.security.auth.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(java.lang.String name)
|
protected void |
setPasswordProperty(Content userNode,
java.lang.String clearPassword)
|
void |
updateUserListWithAllChildren(Content node,
java.util.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(java.lang.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 java.lang.String PROPERTY_EMAIL
public static final java.lang.String PROPERTY_LANGUAGE
public static final java.lang.String PROPERTY_LASTACCESS
public static final java.lang.String PROPERTY_PASSWORD
public static final java.lang.String PROPERTY_TITLE
public static final java.lang.String NODE_ACLUSERS
Constructor Detail |
---|
public MgnlUserManager()
Method Detail |
---|
public java.lang.String getName()
public void setName(java.lang.String name)
public java.lang.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(java.lang.String name)
getUser
in interface UserManager
name
-
public User getUser(javax.security.auth.Subject subject) throws java.lang.UnsupportedOperationException
UserManager
getUser
in interface UserManager
java.lang.UnsupportedOperationException
- if the current implementation doesn't support this operationprotected User getFromRepository(java.lang.String name) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
protected Content findUserNode(java.lang.String realm, java.lang.String name) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
public User getSystemUser() throws java.lang.UnsupportedOperationException
getSystemUser
in interface UserManager
java.lang.UnsupportedOperationException
- if the current implementation doesn't support this operationpublic User getAnonymousUser() throws java.lang.UnsupportedOperationException
getAnonymousUser
in interface UserManager
java.lang.UnsupportedOperationException
- if the current implementation doesn't support this operationpublic java.util.Collection<User> getAllUsers()
getAllUsers
in interface UserManager
public void updateUserListWithAllChildren(Content node, java.util.Collection<User> users)
public User createUser(java.lang.String name, java.lang.String pw)
UserManager
createUser
in interface UserManager
public void changePassword(User user, java.lang.String newPassword)
UserManager
changePassword
in interface UserManager
protected void setPasswordProperty(Content userNode, java.lang.String clearPassword) throws javax.jcr.RepositoryException
javax.jcr.RepositoryException
protected java.lang.String encodePassword(java.lang.String clearPassword)
protected void validateUsername(java.lang.String name)
protected Content createUserNode(java.lang.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 |