public interface UserStoreManager
| Modifier and Type | Method and Description |
|---|---|
void |
addRememberMe(String userName,
String token)
Adding a remember me token
|
void |
addRole(String roleName,
String[] userList,
Permission[] permissions)
Adds a role to the system.
|
void |
addRole(String roleName,
String[] userList,
Permission[] permissions,
boolean isSharedRole)
Adds a role to the system.
|
void |
addUser(String userName,
Object credential,
String[] roleList,
Map<String,String> claims,
String profileName)
Add a user to the user store
|
void |
addUser(String userName,
Object credential,
String[] roleList,
Map<String,String> claims,
String profileName,
boolean requirePasswordChange)
Add a user to the user store
|
boolean |
authenticate(String userName,
Object credential)
Given the user name and a credential object, the implementation code must
validate whether the user is authenticated.
|
void |
deleteRole(String roleName)
Delete the role with the given role name
|
void |
deleteUser(String userName)
Delete the user with the given user name
|
void |
deleteUserClaimValue(String userName,
String claimURI,
String profileName)
Delete a single user claim value
|
void |
deleteUserClaimValues(String userName,
String[] claims,
String profileName)
Delete many user claim values.
|
String[] |
getAllProfileNames()
Get all the profile names in the system
|
ClaimManager |
getClaimManager()
Provides the handler to ClaimManager implementation.
|
Properties |
getDefaultUserStoreProperties()
Get the list of properties required by the User Store Manager, with default values
|
String[] |
getHybridRoles()
Gets a list of hybrid roles
Hybrid role contains a set of user names in a read only user store.
|
Date |
getPasswordExpirationTime(String username)
Gets the password expiration time of a given user
|
String[] |
getProfileNames(String userName)
Get all profile names
|
Map<String,String> |
getProperties(Tenant tenant)
Gets the properties of the Tenant.
|
String[] |
getRoleListOfUser(String userName)
Get roles of a user.
|
String[] |
getRoleNames()
Get all role names
|
int |
getTenantId()
This will get the tenant id associated with the user store manager
|
int |
getTenantId(String username)
This method works only if the tenant is super tenant.
|
String |
getUserClaimValue(String userName,
String claim,
String profileName)
Get user claim value in the profile.
|
Claim[] |
getUserClaimValues(String userName,
String profileName)
Get all claim values of the user in the profile.
|
Map<String,String> |
getUserClaimValues(String userName,
String[] claims,
String profileName)
Get user claim values in the profile.
|
int |
getUserId(String username)
Deprecated.
|
String[] |
getUserListOfRole(String roleName) |
boolean |
isExistingRole(String roleName)
Checks whether the role name is in the user store
|
boolean |
isExistingRole(String roleName,
boolean isShared)
Checks whether the role name is in the user store
|
boolean |
isExistingUser(String userName)
Checks whether the user is in the user store
|
boolean |
isMultipleProfilesAllowed()
This method is to check whether multiple profiles are allowed with a particular user-store.
|
boolean |
isReadOnly()
Checks whether this realm connects to a read only user store
|
boolean |
isSCIMEnabled()
To signal whether underlying user store supports SCIM attributes.
|
boolean |
isValidRememberMeToken(String userName,
String token)
Checking the validity of the remember me token
|
String[] |
listUsers(String filter,
int maxItemLimit)
Retrieves a list of user names upto a maximum limit
|
void |
setUserClaimValue(String userName,
String claimURI,
String claimValue,
String profileName)
Set a single user claim value
|
void |
setUserClaimValues(String userName,
Map<String,String> claims,
String profileName)
Set many user claim values
|
void |
updateCredential(String userName,
Object newCredential,
Object oldCredential)
Update the credential/password of the user
|
void |
updateCredentialByAdmin(String userName,
Object newCredential)
Update credential/password by the admin of another user
|
void |
updateRoleListOfUser(String userName,
String[] deletedRoles,
String[] newRoles)
Updates roles of a user
|
void |
updateRoleName(String roleName,
String newRoleName)
Update the role name of given role
|
void |
updateUserListOfRole(String roleName,
String[] deletedUsers,
String[] newUsers)
Updates users in a Role
|
boolean authenticate(String userName, Object credential) throws UserStoreException
userName - The user namecredential - The credential of a userUserStoreException - An unexpected exception has occurredString[] listUsers(String filter, int maxItemLimit) throws UserStoreException
filter - The string to filter out usermaxItemLimit - The max item limit. If -1 then system maximum limit will be
used. If the given value is greater than the system configured
max limit it will be reseted to the system configured max
limit.UserStoreExceptionboolean isExistingUser(String userName) throws UserStoreException
userName - The user nameUserStoreExceptionboolean isExistingRole(String roleName, boolean isShared) throws UserStoreException
roleName - UserStoreExceptionboolean isExistingRole(String roleName) throws UserStoreException
roleName - UserStoreExceptionString[] getRoleNames() throws UserStoreException
UserStoreExceptionString[] getProfileNames(String userName) throws UserStoreException
userName - The user nameUserStoreExceptionString[] getRoleListOfUser(String userName) throws UserStoreException
userName - The user nameUserStoreExceptionString[] getUserListOfRole(String roleName) throws UserStoreException
UserStoreExceptionString getUserClaimValue(String userName, String claim, String profileName) throws UserStoreException
userName - The user nameclaim - The claim URIprofileName - The profile name, can be null. If null the default profile is
considered.UserStoreExceptionMap<String,String> getUserClaimValues(String userName, String[] claims, String profileName) throws UserStoreException
userName - The user nameclaims - The claim URIprofileName - The profile name, can be null. If null the default profile is
considered.UserStoreExceptionClaim[] getUserClaimValues(String userName, String profileName) throws UserStoreException
userName - The user nameprofileName - The profile name, can be null. If null the default profile is
considered.UserStoreExceptionString[] getAllProfileNames() throws UserStoreException
UserStoreExceptionboolean isReadOnly()
throws UserStoreException
UserStoreExceptionvoid addUser(String userName, Object credential, String[] roleList, Map<String,String> claims, String profileName) throws UserStoreException
userName - User name of the usercredential - The credential/password of the userroleList - The roles that user belongsclaims - Properties of the userprofileName - The name of the profile where claims should be addedUserStoreExceptionvoid addUser(String userName, Object credential, String[] roleList, Map<String,String> claims, String profileName, boolean requirePasswordChange) throws UserStoreException
userName - User name of the usercredential - The credential/password of the userroleList - The roles that user belongsclaims - Properties of the userprofileName - The name of the profile where claims should be addedrequirePasswordChange - Require the password change within next 24 hoursUserStoreExceptionvoid updateCredential(String userName, Object newCredential, Object oldCredential) throws UserStoreException
userName - The user namenewCredential - The new credential/passwordoldCredential - The old credential/passwordUserStoreExceptionvoid updateCredentialByAdmin(String userName, Object newCredential) throws UserStoreException
userName - The user namenewCredential - The new credentialUserStoreExceptionvoid deleteUser(String userName) throws UserStoreException
userName - The user nameUserStoreExceptionvoid addRole(String roleName, String[] userList, Permission[] permissions, boolean isSharedRole) throws UserStoreException
roleName - The role name.userList - the list of the users.permissions - The permissions of the role.isSharedRole - Whether the added role is a shared role or notUserStoreExceptionvoid addRole(String roleName, String[] userList, Permission[] permissions) throws UserStoreException
roleName - The role name.userList - the list of the users.permissions - The permissions of the role.isSharedRole - Whether the added role is a shared role or notUserStoreExceptionvoid deleteRole(String roleName) throws UserStoreException
roleName - The role nameUserStoreExceptionvoid updateUserListOfRole(String roleName, String[] deletedUsers, String[] newUsers) throws UserStoreException
roleName - The role name to be updateddeletedUsers - The array of user names to be deletednewUsers - The array of of user names to be addedUserStoreExceptionvoid updateRoleListOfUser(String userName, String[] deletedRoles, String[] newRoles) throws UserStoreException
userName - The user name of the user where role list is updateddeletedRoles - The array of role names to be addednewRoles - The array of role names to be addedUserStoreExceptionvoid setUserClaimValue(String userName, String claimURI, String claimValue, String profileName) throws UserStoreException
userName - The user nameclaimURI - The claim URIclaimValue - The valueprofileName - The profile name, can be null. If null the default profile is
considered.UserStoreExceptionvoid setUserClaimValues(String userName, Map<String,String> claims, String profileName) throws UserStoreException
userName - The user nameclaims - Map of claim URIs against valuesprofileName - The profile name, can be null. If null the default profile is
considered.UserStoreExceptionvoid deleteUserClaimValue(String userName, String claimURI, String profileName) throws UserStoreException
userName - The user nameclaimURI - Name of the claimprofileName - The profile name, can be null. If null the default profile is
considered.UserStoreExceptionvoid deleteUserClaimValues(String userName, String[] claims, String profileName) throws UserStoreException
userName - The user nameclaims - URIs of the claims to be deleted.profileName - The profile name, can be null. If null the default profile is
considered.UserStoreExceptionString[] getHybridRoles() throws UserStoreException
UserStoreExceptionDate getPasswordExpirationTime(String username) throws UserStoreException
username - The user nameUserStoreExceptionint getUserId(String username) throws UserStoreException
username - The user nameUserStoreExceptionint getTenantId(String username) throws UserStoreException
username - The user nameUserStoreExceptionint getTenantId()
throws UserStoreException
UserStoreException - if the operation failedMap<String,String> getProperties(Tenant tenant) throws UserStoreException
tenant - UserStoreExceptionvoid updateRoleName(String roleName, String newRoleName) throws UserStoreException
roleName - newRoleName - UserStoreExceptionboolean isMultipleProfilesAllowed()
void addRememberMe(String userName, String token) throws UserStoreException
userName - - User nametoken - - The token to be storedUserStoreExceptionboolean isValidRememberMeToken(String userName, String token) throws UserStoreException
userName - TODOtoken - TODOUserStoreExceptionClaimManager getClaimManager() throws UserStoreException
UserStoreExceptionboolean isSCIMEnabled()
throws UserStoreException
UserStoreExceptionProperties getDefaultUserStoreProperties()
Copyright © 2018 WSO2 Inc. All rights reserved.