|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.seam.security.management.LdapIdentityStore
@Name(value="org.jboss.seam.security.identityStore") @Install(precedence=0, value=false) @Scope(value=APPLICATION) @BypassInterceptors public class LdapIdentityStore
An IdentityStore implementation that integrates with a directory service.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.jboss.seam.security.management.IdentityStore |
---|
IdentityStore.Feature, IdentityStore.FeatureSet |
Field Summary | |
---|---|
protected IdentityStore.FeatureSet |
featureSet
|
Constructor Summary | |
---|---|
LdapIdentityStore()
|
Method Summary | |
---|---|
boolean |
addRoleToGroup(String role,
String group)
Adds the specified role as a member of the specified group. |
boolean |
authenticate(String username,
String password)
Authenticates the specified user, using the specified password. |
boolean |
changePassword(String name,
String password)
Changes the password of the specified user to the specified password. |
boolean |
createRole(String role)
Creates a new role with the specified role name. |
boolean |
createUser(String username,
String password)
Creates a new user with the specified username and password. |
boolean |
createUser(String username,
String password,
String firstname,
String lastname)
Creates a new user with the specified username, password, first name and last name. |
boolean |
deleteRole(String role)
Deletes the specified role. |
boolean |
deleteUser(String name)
Deletes the user with the specified username. |
boolean |
disableUser(String name)
Disables the user with the specified username. |
boolean |
enableUser(String name)
Enables the user with the specified username. |
String |
getBindCredentials()
|
String |
getBindDN()
|
String |
getEnabledAttribute()
|
Set<IdentityStore.Feature> |
getFeatures()
|
String |
getFirstNameAttribute()
|
String |
getFullNameAttribute()
|
List<String> |
getGrantedRoles(String name)
Returns a list of all the roles explicitly granted to the specified user. |
List<String> |
getImpliedRoles(String name)
Returns a list of all roles that the specified user is a member of. |
String |
getLastNameAttribute()
|
String |
getObjectClassAttribute()
|
boolean |
getRoleAttributeIsDN()
|
String |
getRoleContextDN()
|
protected String |
getRoleDN(String role)
|
String |
getRoleDNPrefix()
|
String |
getRoleDNSuffix()
|
List<String> |
getRoleGroups(String name)
Returns a list of all the groups that the specified role is a member of. |
String |
getRoleNameAttribute()
|
String[] |
getRoleObjectClasses()
|
String |
getSearchScope()
|
int |
getSearchTimeLimit()
|
String |
getServerAddress()
|
int |
getServerPort()
|
String |
getUserContextDN()
|
protected String |
getUserDN(String username)
|
String |
getUserDNPrefix()
|
String |
getUserDNSuffix()
|
String |
getUserNameAttribute()
|
String[] |
getUserObjectClasses()
|
String |
getUserPasswordAttribute()
|
String |
getUserRoleAttribute()
|
boolean |
grantRole(String name,
String role)
Grants the specified role to the specified user. |
protected InitialLdapContext |
initialiseContext()
|
protected InitialLdapContext |
initialiseContext(String principal,
String credentials)
|
boolean |
isUserEnabled(String name)
Returns true if the specified user is enabled. |
List<String> |
listGrantableRoles()
Returns a list of roles that can be granted (i.e, excluding conditional roles) |
List<Principal> |
listMembers(String role)
Lists the members of the specified role. |
List<String> |
listRoles()
Returns a list of all the roles. |
List<String> |
listUsers()
Returns a list of all users. |
List<String> |
listUsers(String filter)
Returns a list of all users containing the specified filter text within their username. |
boolean |
removeRoleFromGroup(String role,
String group)
Removes the specified role from the specified group. |
boolean |
revokeRole(String name,
String role)
Revokes the specified role from the specified user. |
boolean |
roleExists(String role)
Returns true if the specified role exists. |
void |
setBindCredentials(String bindCredentials)
|
void |
setBindDN(String bindDN)
|
void |
setEnabledAttribute(String enabledAttribute)
|
void |
setFeatures(Set<IdentityStore.Feature> features)
|
void |
setFirstNameAttribute(String firstNameAttribute)
|
void |
setFullNameAttribute(String fullNameAttribute)
|
void |
setLastNameAttribute(String lastNameAttribute)
|
void |
setObjectClassAttribute(String objectClassAttribute)
|
void |
setRoleAttributeIsDN(boolean value)
|
void |
setRoleContextDN(String roleContextDN)
|
void |
setRoleDNPrefix(String value)
|
void |
setRoleDNSuffix(String value)
|
void |
setRoleNameAttribute(String roleNameAttribute)
|
void |
setRoleObjectClass(String[] roleObjectClasses)
|
void |
setSearchScope(String value)
|
void |
setSearchTimeLimit(int searchTimeLimit)
|
void |
setServerAddress(String serverAddress)
|
void |
setServerPort(int serverPort)
|
void |
setUserContextDN(String userContextDN)
|
void |
setUserDNPrefix(String value)
|
void |
setUserDNSuffix(String value)
|
void |
setUserNameAttribute(String userNameAttribute)
|
void |
setUserObjectClasses(String[] userObjectClasses)
|
void |
setUserPasswordAttribute(String userPasswordAttribute)
|
void |
setUserRoleAttribute(String userRoleAttribute)
|
boolean |
supportsFeature(IdentityStore.Feature feature)
Returns true if the IdentityStore implementation supports the specified feature. |
boolean |
userExists(String name)
Returns true if the specified user exists. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected IdentityStore.FeatureSet featureSet
Constructor Detail |
---|
public LdapIdentityStore()
Method Detail |
---|
public String getServerAddress()
public void setServerAddress(String serverAddress)
public int getServerPort()
public void setServerPort(int serverPort)
public String getUserContextDN()
public void setUserContextDN(String userContextDN)
public String getRoleContextDN()
public void setRoleContextDN(String roleContextDN)
public String getUserDNPrefix()
public void setUserDNPrefix(String value)
public String getUserDNSuffix()
public void setUserDNSuffix(String value)
public String getRoleDNPrefix()
public void setRoleDNPrefix(String value)
public String getRoleDNSuffix()
public void setRoleDNSuffix(String value)
public String getBindDN()
public void setBindDN(String bindDN)
public String getBindCredentials()
public void setBindCredentials(String bindCredentials)
public String getUserRoleAttribute()
public void setUserRoleAttribute(String userRoleAttribute)
public boolean getRoleAttributeIsDN()
public void setRoleAttributeIsDN(boolean value)
public String getRoleNameAttribute()
public void setRoleNameAttribute(String roleNameAttribute)
public String getUserNameAttribute()
public void setUserNameAttribute(String userNameAttribute)
public String getUserPasswordAttribute()
public void setUserPasswordAttribute(String userPasswordAttribute)
public String getFirstNameAttribute()
public void setFirstNameAttribute(String firstNameAttribute)
public String getLastNameAttribute()
public void setLastNameAttribute(String lastNameAttribute)
public String getFullNameAttribute()
public void setFullNameAttribute(String fullNameAttribute)
public String getEnabledAttribute()
public void setEnabledAttribute(String enabledAttribute)
public String getObjectClassAttribute()
public void setObjectClassAttribute(String objectClassAttribute)
public String[] getRoleObjectClasses()
public void setRoleObjectClass(String[] roleObjectClasses)
public String[] getUserObjectClasses()
public void setUserObjectClasses(String[] userObjectClasses)
public int getSearchTimeLimit()
public void setSearchTimeLimit(int searchTimeLimit)
public String getSearchScope()
public void setSearchScope(String value)
public Set<IdentityStore.Feature> getFeatures()
public void setFeatures(Set<IdentityStore.Feature> features)
public boolean supportsFeature(IdentityStore.Feature feature)
IdentityStore
supportsFeature
in interface IdentityStore
protected final InitialLdapContext initialiseContext() throws NamingException
NamingException
protected final InitialLdapContext initialiseContext(String principal, String credentials) throws NamingException
NamingException
protected String getUserDN(String username)
protected String getRoleDN(String role)
public boolean authenticate(String username, String password)
IdentityStore
authenticate
in interface IdentityStore
public boolean changePassword(String name, String password)
IdentityStore
changePassword
in interface IdentityStore
public boolean createRole(String role)
IdentityStore
createRole
in interface IdentityStore
public boolean createUser(String username, String password, String firstname, String lastname)
IdentityStore
createUser
in interface IdentityStore
public boolean createUser(String username, String password)
IdentityStore
createUser
in interface IdentityStore
public boolean deleteRole(String role)
IdentityStore
deleteRole
in interface IdentityStore
public boolean roleExists(String role)
IdentityStore
roleExists
in interface IdentityStore
public boolean deleteUser(String name)
IdentityStore
deleteUser
in interface IdentityStore
public boolean isUserEnabled(String name)
IdentityStore
isUserEnabled
in interface IdentityStore
public boolean disableUser(String name)
IdentityStore
disableUser
in interface IdentityStore
public boolean enableUser(String name)
IdentityStore
enableUser
in interface IdentityStore
public List<String> getGrantedRoles(String name)
IdentityStore
getGrantedRoles
in interface IdentityStore
public List<String> getImpliedRoles(String name)
IdentityStore
getImpliedRoles
in interface IdentityStore
public boolean grantRole(String name, String role)
IdentityStore
grantRole
in interface IdentityStore
name
- The name of the userrole
- The name of the role to grant to the user.
public boolean revokeRole(String name, String role)
IdentityStore
revokeRole
in interface IdentityStore
name
- The name of the userrole
- The name of the role to grant to the user.
public List<String> listRoles()
IdentityStore
listRoles
in interface IdentityStore
public List<String> listGrantableRoles()
IdentityStore
listGrantableRoles
in interface IdentityStore
public List<String> listUsers()
IdentityStore
listUsers
in interface IdentityStore
public List<String> listUsers(String filter)
IdentityStore
listUsers
in interface IdentityStore
public boolean userExists(String name)
IdentityStore
userExists
in interface IdentityStore
public List<String> getRoleGroups(String name)
IdentityStore
getRoleGroups
in interface IdentityStore
public List<Principal> listMembers(String role)
IdentityStore
listMembers
in interface IdentityStore
public boolean addRoleToGroup(String role, String group)
IdentityStore
addRoleToGroup
in interface IdentityStore
role
- The name of the role to add as a membergroup
- The name of the group that the specified role will be added to.
public boolean removeRoleFromGroup(String role, String group)
IdentityStore
removeRoleFromGroup
in interface IdentityStore
role
- The name of the role to remove from the group.group
- The group from which to remove the role.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |