|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object info.magnolia.cms.security.ExternalUserManager
public class ExternalUserManager
Manages the JAAS users.
Field Summary |
---|
Fields inherited from interface info.magnolia.cms.security.UserManager |
---|
ANONYMOUS_USER, SYSTEM_PSWD, SYSTEM_USER |
Constructor Summary | |
---|---|
ExternalUserManager()
|
Method Summary | |
---|---|
User |
addGroup(User user,
String groupName)
Adds user to a group. |
User |
addRole(User user,
String roleName)
Grants user role. |
User |
changePassword(User user,
String newPassword)
Sets a new password. |
User |
createUser(String name,
String pw)
Creates a user without security restrictions. |
User |
createUser(String path,
String name,
String pw)
Creates a user on given path. |
Map<String,ACL> |
getACLs(User user)
Returns all ACLs assigned to the given user. |
Collection<User> |
getAllUsers()
Get all users. |
User |
getAnonymousUser()
SystemUserManager does this. |
int |
getLockTimePeriod()
Gets a time period for account lock. |
int |
getMaxFailedLoginAttempts()
Gets a number of failed attempts before locking account. |
User |
getSystemUser()
SystemUserManager does this. |
User |
getUser(Map<String,String> properties,
GroupList groupList,
RoleList roleList)
|
User |
getUser(String name)
Find a specific user. |
User |
getUser(Subject subject)
Initialize new user using JAAS authenticated/authorized subject. |
User |
getUserById(String id)
Find a specific user. |
boolean |
hasAny(String name,
String roleName,
String nodeRoles)
Checks whether principal belongs to the named resource. |
User |
removeGroup(User user,
String groupName)
Removes user from a group. |
User |
removeRole(User user,
String roleName)
Removes role from a user. |
void |
setLockTimePeriod(int lockTimePeriod)
Sets a time period for account lock. |
void |
setMaxFailedLoginAttempts(int maxFailedLoginAttempts)
Sets a number of failed attempts before locking account. |
User |
setProperty(User user,
String propertyName,
String propertyValue)
Sets given property for the user and returns updated user object with new value of the property. |
User |
setProperty(User user,
String propertyName,
javax.jcr.Value propertyValue)
Sets given property for the user and returns updated user object with new value of the property. |
void |
updateLastAccessTimestamp(User user)
Updates last access timestamp for the user. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExternalUserManager()
Method Detail |
---|
public User getUser(String name) throws UnsupportedOperationException
UserManager
getUser
in interface UserManager
name
- the name of the user
UnsupportedOperationException
public User getUserById(String id) throws UnsupportedOperationException
UserManager
getUserById
in interface UserManager
id
- user identifier
UnsupportedOperationException
public User getUser(Subject subject) throws UnsupportedOperationException
getUser
in interface UserManager
subject
-
UnsupportedOperationException
public User getUser(Map<String,String> properties, GroupList groupList, RoleList roleList)
public Collection<User> getAllUsers() throws UnsupportedOperationException
UserManager
getAllUsers
in interface UserManager
UnsupportedOperationException
- if the current implementation doesn't support this operationpublic User createUser(String name, String pw) throws UnsupportedOperationException
UserManager
createUser
in interface UserManager
UnsupportedOperationException
- if the current implementation doesn't support this operationpublic User createUser(String path, String name, String pw) throws UnsupportedOperationException
UserManager
createUser
in interface UserManager
UnsupportedOperationException
- if the current implementation doesn't support this operationpublic User changePassword(User user, String newPassword) throws UnsupportedOperationException
UserManager
changePassword
in interface UserManager
UnsupportedOperationException
- if the current implementation doesn't support this operationpublic 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 void updateLastAccessTimestamp(User user) throws UnsupportedOperationException
UserManager
updateLastAccessTimestamp
in interface UserManager
UnsupportedOperationException
- if the current implementation doesn't support this operationpublic boolean hasAny(String name, String roleName, String nodeRoles) throws UnsupportedOperationException
UserManager
hasAny
in interface UserManager
roleName
- either group or role namenodeRoles
- either group or role see
UnsupportedOperationException
public Map<String,ACL> getACLs(User user)
UserManager
getACLs
in interface UserManager
public User addRole(User user, String roleName)
UserManager
addRole
in interface UserManager
public User addGroup(User user, String groupName)
UserManager
addGroup
in interface UserManager
public int getLockTimePeriod()
UserManager
getLockTimePeriod
in interface UserManager
public int getMaxFailedLoginAttempts()
UserManager
getMaxFailedLoginAttempts
in interface UserManager
public void setLockTimePeriod(int lockTimePeriod)
UserManager
setLockTimePeriod
in interface UserManager
public void setMaxFailedLoginAttempts(int maxFailedLoginAttempts)
UserManager
setMaxFailedLoginAttempts
in interface UserManager
public User setProperty(User user, String propertyName, javax.jcr.Value propertyValue)
UserManager
setProperty
in interface UserManager
user
- User to be updated. If property doesn't exist yet, it will be created. If the value is null, property will be removed if existing.propertyName
- Name of the property.propertyValue
- Value of the property. Use org.apache.jackrabbit.value.ValueFactoryImpl to convert type to Value.
public User setProperty(User user, String propertyName, String propertyValue)
UserManager
setProperty
in interface UserManager
public User removeGroup(User user, String groupName)
UserManager
removeGroup
in interface UserManager
public User removeRole(User user, String roleName)
UserManager
removeRole
in interface UserManager
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |