org.jboss.seam.security.management
Class IdentityManager
java.lang.Object
org.jboss.seam.security.management.IdentityManager
- All Implemented Interfaces:
- Serializable
@Scope(value=EVENT)
@Name(value="org.jboss.seam.security.identityManager")
@Install(precedence=0)
@BypassInterceptors
public class IdentityManager
- extends Object
- implements Serializable
Identity Management API, deals with user name/password-based identity management.
- Author:
- Shane Bryzak
- See Also:
- Serialized Form
Method Summary |
boolean |
addRoleToGroup(String role,
String group)
|
boolean |
authenticate(String username,
String password)
|
boolean |
changePassword(String name,
String password)
|
void |
create()
|
boolean |
createRole(String role)
|
boolean |
createUser(String name,
String password)
|
boolean |
createUser(String name,
String password,
String firstname,
String lastname)
|
boolean |
deleteRole(String role)
|
boolean |
deleteUser(String name)
|
boolean |
disableUser(String name)
|
boolean |
enableUser(String name)
|
List<String> |
getGrantedRoles(String name)
Returns a list of the roles that are explicitly granted to the specified user; |
IdentityStore |
getIdentityStore()
|
List<String> |
getImpliedRoles(String name)
Returns a list of roles that are either explicitly or indirectly granted to the specified user. |
List<String> |
getRoleGroups(String name)
|
IdentityStore |
getRoleIdentityStore()
|
boolean |
grantRole(String name,
String role)
|
protected void |
initIdentityStore()
|
static IdentityManager |
instance()
|
boolean |
isEnabled()
|
boolean |
isUserEnabled(String name)
|
List<String> |
listGrantableRoles()
|
List<Principal> |
listMembers(String role)
|
List<String> |
listRoles()
|
List<String> |
listUsers()
|
List<String> |
listUsers(String filter)
|
boolean |
removeRoleFromGroup(String role,
String group)
|
boolean |
revokeRole(String name,
String role)
|
boolean |
roleExists(String name)
|
void |
setIdentityStore(IdentityStore identityStore)
|
void |
setRoleIdentityStore(IdentityStore roleIdentityStore)
|
boolean |
userExists(String name)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
USER_PERMISSION_NAME
public static final String USER_PERMISSION_NAME
- See Also:
- Constant Field Values
ROLE_PERMISSION_NAME
public static final String ROLE_PERMISSION_NAME
- See Also:
- Constant Field Values
PERMISSION_CREATE
public static final String PERMISSION_CREATE
- See Also:
- Constant Field Values
PERMISSION_READ
public static final String PERMISSION_READ
- See Also:
- Constant Field Values
PERMISSION_UPDATE
public static final String PERMISSION_UPDATE
- See Also:
- Constant Field Values
PERMISSION_DELETE
public static final String PERMISSION_DELETE
- See Also:
- Constant Field Values
IdentityManager
public IdentityManager()
create
@Create
public void create()
initIdentityStore
protected void initIdentityStore()
instance
public static IdentityManager instance()
createUser
public boolean createUser(String name,
String password)
createUser
public boolean createUser(String name,
String password,
String firstname,
String lastname)
deleteUser
public boolean deleteUser(String name)
enableUser
public boolean enableUser(String name)
disableUser
public boolean disableUser(String name)
changePassword
public boolean changePassword(String name,
String password)
isUserEnabled
public boolean isUserEnabled(String name)
grantRole
public boolean grantRole(String name,
String role)
revokeRole
public boolean revokeRole(String name,
String role)
createRole
public boolean createRole(String role)
deleteRole
public boolean deleteRole(String role)
addRoleToGroup
public boolean addRoleToGroup(String role,
String group)
removeRoleFromGroup
public boolean removeRoleFromGroup(String role,
String group)
userExists
public boolean userExists(String name)
roleExists
public boolean roleExists(String name)
listUsers
public List<String> listUsers()
listUsers
public List<String> listUsers(String filter)
listRoles
public List<String> listRoles()
listGrantableRoles
public List<String> listGrantableRoles()
getGrantedRoles
public List<String> getGrantedRoles(String name)
- Returns a list of the roles that are explicitly granted to the specified user;
- Parameters:
name
- The user for which to return a list of roles
- Returns:
- List containing the names of the granted roles
getImpliedRoles
public List<String> getImpliedRoles(String name)
- Returns a list of roles that are either explicitly or indirectly granted to the specified user.
- Parameters:
name
- The user for which to return the list of roles
- Returns:
- List containing the names of the implied roles
listMembers
public List<Principal> listMembers(String role)
getRoleGroups
public List<String> getRoleGroups(String name)
authenticate
public boolean authenticate(String username,
String password)
getIdentityStore
public IdentityStore getIdentityStore()
setIdentityStore
public void setIdentityStore(IdentityStore identityStore)
getRoleIdentityStore
public IdentityStore getRoleIdentityStore()
setRoleIdentityStore
public void setRoleIdentityStore(IdentityStore roleIdentityStore)
isEnabled
public boolean isEnabled()
Copyright © 2011 Seam Framework. All Rights Reserved.