public class UserManager extends AbstractEntityManager
| Modifier and Type | Method and Description |
|---|---|
boolean |
authenticateUser(java.security.Principal principal, char[] password)
Authenticates user for given User principal and password
|
boolean |
authenticateUser(java.security.Principal principal, char[] password, boolean checkPwdPolicyWarning)
Authenticates user for given User principal and password
|
User |
authenticateUser(java.lang.String id, char[] password, ReadOptions opts)
Authenticates user for given id and password
|
User |
authenticateUser(java.lang.String id, char[] password, ReadOptions opts, boolean checkPwdPolicyWarning)
Authenticates user for given id and password
|
User |
authenticateUser(java.lang.String attrName, java.lang.String attrVal, char[] password, ReadOptions opts)
Authenticates user for given unique attrname, attrvalue and password
|
User |
authenticateUser(java.lang.String attrName, java.lang.String attrVal, char[] password, ReadOptions opts, boolean checkPwdPolicyWarning)
Authenticates user for given unique attrname, attrvalue and password
|
void |
changePassword(java.security.Principal principal, char[] oldPassword, char[] newPassword, ModifyOptions opts)
Changes user password given the old and new password
|
void |
changePassword(java.lang.String id, char[] oldPassword, char[] newPassword, ModifyOptions opts)
Changes user password given the old and new password
|
void |
changePassword(java.lang.String attrName, java.lang.String attrVal, char[] oldPassword, char[] newPassword, ModifyOptions opts)
Changes user password given the old and new password
|
java.security.Principal |
createUser(java.util.List<Attribute> attrVals, CreateOptions opts)
Creates user in the repository with given list of attribute values
|
void |
deleteUser(java.security.Principal principal, DeleteOptions opts)
Deletes the user from repository for given user principal
|
void |
deleteUser(java.lang.String id, DeleteOptions opts)
Deletes the user from repository for given user id attribute value
|
void |
deleteUser(java.lang.String attrName, java.lang.String attrVal, DeleteOptions opts)
Deletes the user from repository for given unique attrname and value
|
UserCapabilities |
getCapabilities() |
User |
getUser(java.security.Principal principal, ReadOptions opts)
Get user for the given principal identifier
|
void |
resetPassword(java.security.Principal principal, char[] password, ModifyOptions opts)
Resets user password
|
void |
resetPassword(java.lang.String id, char[] password, ModifyOptions opts)
Resets user password
|
void |
resetPassword(java.lang.String attrName, java.lang.String attrVal, char[] password, ModifyOptions opts)
Resets user password
|
User |
searchUser(java.lang.String id, ReadOptions opts)
Search for user matching given id attribute value that uniquely identifies the user
|
User |
searchUser(java.lang.String attrName, java.lang.String attrVal, ReadOptions opts)
Finds user matching given attribute name and value
|
User |
searchUserByGuid(java.lang.String guid, ReadOptions opts)
Search for user matching given GUID value that uniquely identifies the user
|
ResultSet<User> |
searchUsers(SearchFilter filter, SearchOptions opts)
Searches the repository and returns list of users matching the given filter condition.
|
boolean |
validatePassword(java.security.Principal principal, char[] password)
Validates user password for given principal without bind in LDAP repository.
|
boolean |
validatePassword(java.security.Principal principal, char[] password, boolean checkPwdPolicyWarning)
Validates user password for given principal without bind in LDAP repository.
|
User |
validatePassword(java.lang.String id, char[] password, ReadOptions opts)
Validates user password for given id without bind in LDAP repository.
|
User |
validatePassword(java.lang.String id, char[] password, ReadOptions opts, boolean checkPwdPolicyWarning)
Validates user password for given id without bind in LDAP repository.
|
User |
validatePassword(java.lang.String attrName, java.lang.String attrVal, char[] password, ReadOptions opts)
Validates user password for given attrname and value without bind in LDAP repository.
|
User |
validatePassword(java.lang.String attrName, java.lang.String attrVal, char[] password, ReadOptions opts, boolean checkPwdPolicyWarning)
Validates user password for given attrname and value without bind in LDAP repository.
|
compareEntityAttr, compareEntityAttr, getAttributeDef, getAttributeRef, getEntityAttributes, getEntityDef, getEntityRelationships, getGlobalCommonIdAttribute, getIdAttribute, modify, modify, modify, renamepublic java.security.Principal createUser(java.util.List<Attribute> attrVals, CreateOptions opts) throws IDSException, EntityAlreadyExistsException, OperationNotSupportedException, AuthorizationException, InvalidAttributesException
attrVals - List of attribute valuesopts - Create operation optionsIDSException - Generic Identity Directory Service exceptionEntityAlreadyExistsException - When the user to be created already existsOperationNotSupportedException - If the user create operation is not supportedInvalidAttributesException - When the add attributes list is invalidAuthorizationException - If user does not have sufficient privilegespublic User getUser(java.security.Principal principal, ReadOptions opts) throws EntityNotFoundException, IDSException, AuthorizationException, InvalidAttributesException
principal - Principal identifier of the useropts - Read operation optionsEntityNotFoundException - When there is no user in the repository for given user principalIDSException - Generic Identity Directory Service exceptionInvalidAttributesException - If the requested attributes is invalidAuthorizationException - If user does not have sufficient privilegespublic User searchUser(java.lang.String id, ReadOptions opts) throws IDSException, EntityNotFoundException, EntityNotUniqueException, AuthorizationException, InvalidAttributesException
id - Value of the user's id attributeopts - Read operation optionsIDSException - Generic Identity Directory Service exceptionEntityNotFoundException - When there is no user found for given ID valueEntityNotUniqueException - When the given filter condition does not uniquely identify the userInvalidAttributesException - If the requested attributes is invalidAuthorizationException - If user does not have sufficient privilegespublic User searchUser(java.lang.String attrName, java.lang.String attrVal, ReadOptions opts) throws IDSException, EntityNotFoundException, EntityNotUniqueException, InvalidFilterException, AuthorizationException, InvalidAttributesException
attrName - Name of the attributeattrVal - Attribute valueopts - Read operation optionsIDSException - Generic Identity Directory Service exceptionEntityNotFoundException - When no user found for given search filterEntityNotUniqueException - When the given filter condition does not uniquely identify the userInvalidFilterException - If the attribute is invalid filter attributeInvalidAttributesException - If the requested attributes is invalidAuthorizationException - If user does not have sufficient privilegespublic User searchUserByGuid(java.lang.String guid, ReadOptions opts) throws IDSException, EntityNotFoundException, EntityNotUniqueException, AuthorizationException, InvalidAttributesException
guid - GUID value of useropts - Read operation optionsIDSException - Generic Identity Directory Service exceptionEntityNotFoundException - When there is no user found for given GUID valueEntityNotUniqueException - When the given GUID values does not uniquely identify the userInvalidAttributesException - If the requested attributes is invalidAuthorizationException - If user does not have sufficient privilegespublic ResultSet<User> searchUsers(SearchFilter filter, SearchOptions opts) throws IDSException, InvalidFilterException, OperationNotSupportedException, AuthorizationException, InvalidAttributesException
filter - Search filteropts - Search operation optionsIDSException - Generic Identity Directory Service exceptionInvalidFilterException - When the input search filter is not validOperationNotSupportedException - When this user search operation is not supportedInvalidAttributesException - When the requested attributes or the attributes in the search filter are invalidAuthorizationException - If user does not have sufficient privilegespublic void deleteUser(java.security.Principal principal,
DeleteOptions opts)
throws EntityNotFoundException,
IDSException,
AuthorizationException,
OperationNotSupportedException
principal - User principalopts - Delete operation optionsEntityNotFoundException - When there is no user in the repository for given user principalIDSException - Generic Identity Directory Service exceptionOperationNotSupportedException - If the user delete operation is not supportedAuthorizationException - If user does not have sufficient privilegespublic void deleteUser(java.lang.String id,
DeleteOptions opts)
throws EntityNotFoundException,
IDSException,
AuthorizationException,
OperationNotSupportedException
id - User id valueopts - Delete operation optionsEntityNotFoundException - When there is no user in the repository for given user principalIDSException - Generic Identity Directory Service exceptionOperationNotSupportedException - If the user delete operation is not supportedAuthorizationException - If user does not have sufficient privilegespublic void deleteUser(java.lang.String attrName,
java.lang.String attrVal,
DeleteOptions opts)
throws EntityNotFoundException,
IDSException,
AuthorizationException,
OperationNotSupportedException
attrName - Name of the attributeattrVal - Attribute valueopts - Delete operation optionsEntityNotFoundException - When there is no user in the repository for given user principalIDSException - Generic Identity Directory Service exceptionOperationNotSupportedException - If the user delete operation is not supportedAuthorizationException - If user does not have sufficient privilegespublic User authenticateUser(java.lang.String id, char[] password, ReadOptions opts) throws IDSException, EntityNotFoundException, EntityNotUniqueException, OperationNotSupportedException, AuthenticationException
id - Id attribute value. ID attribute is defined in the entity configuration that uniquely identifies the user entitypassword - User password to be verifiedopts - Read operation optionsIDSException - Generic Identity Directory Service exceptionEntityNotFoundException - When no user found for given ID valueEntityNotUniqueException - If the given ID value does not uniquely identify the userOperationNotSupportedException - If the user authentication operation is not supportedAuthenticationException - If user authentication failedpublic User authenticateUser(java.lang.String id, char[] password, ReadOptions opts, boolean checkPwdPolicyWarning) throws IDSException, EntityNotFoundException, EntityNotUniqueException, OperationNotSupportedException, AuthenticationWarningException, AuthenticationException
id - Id attribute value. ID attribute is defined in the entity configuration that uniquely identifies the user entitypassword - User password to be verifiedopts - Read operation optionscheckPwdPolicyWarning - If true and there are any password policy related warnings throws AuthenticationWarningExceptionIDSException - Generic Identity Directory Service exceptionEntityNotFoundException - When no user found for given ID valueEntityNotUniqueException - If the given ID value does not uniquely identify the userOperationNotSupportedException - If the user authentication operation is not supportedAuthenticationWarningException - If there are any password policy related warnings like Password must change, Grace Login, Password expire, etcAuthenticationException - If user authentication failedpublic User authenticateUser(java.lang.String attrName, java.lang.String attrVal, char[] password, ReadOptions opts) throws IDSException, EntityNotFoundException, EntityNotUniqueException, OperationNotSupportedException, AuthenticationException
attrName - Name of the attribute that uniquely identifies the userattrVal - Attribute valuepassword - User password to be verifiedopts - Read operation optionsIDSException - Generic Identity Directory Service exceptionEntityNotFoundException - When no user found for given ID valueEntityNotUniqueException - If the given ID value does not uniquely identify the userOperationNotSupportedException - If the user authentication operation is not supportedAuthenticationException - If user authentication failedpublic User authenticateUser(java.lang.String attrName, java.lang.String attrVal, char[] password, ReadOptions opts, boolean checkPwdPolicyWarning) throws IDSException, EntityNotFoundException, EntityNotUniqueException, OperationNotSupportedException, AuthenticationWarningException, AuthenticationException
attrName - Name of the attribute that uniquely identifies the userattrVal - Attribute valuepassword - User password to be verifiedopts - Read operation optionscheckPwdPolicyWarning - If true and there are any password policy related warnings throws AuthenticationWarningExceptionIDSException - Generic Identity Directory Service exceptionEntityNotFoundException - When no user found for given ID valueEntityNotUniqueException - If the given ID value does not uniquely identify the userOperationNotSupportedException - If the user authentication operation is not supportedAuthenticationWarningException - If there are any password policy related warnings like Password must change, Grace Login, Password expire, etcAuthenticationException - If user authentication failedpublic boolean authenticateUser(java.security.Principal principal,
char[] password)
throws IDSException,
EntityNotFoundException,
OperationNotSupportedException,
AuthenticationException
principal - Principal identifier of the userpassword - User passwordIDSException - Generic Identity Directory Service exceptionEntityNotFoundException - When no user found for given ID valueOperationNotSupportedException - If the user authenticate operation is not supportedAuthenticationException - If user authentication failedpublic boolean authenticateUser(java.security.Principal principal,
char[] password,
boolean checkPwdPolicyWarning)
throws IDSException,
EntityNotFoundException,
OperationNotSupportedException,
AuthenticationWarningException,
AuthenticationException
principal - Principal identifier of the userpassword - User passwordcheckPwdPolicyWarning - If true and there are any password policy related warnings throws AuthenticationWarningExceptionIDSException - Generic Identity Directory Service exceptionEntityNotFoundException - When no user found for given ID valueOperationNotSupportedException - If the user authenticate operation is not supportedAuthenticationWarningException - If there are any password policy related warnings like Password must change, Grace Login, Password expire, etcAuthenticationException - If user authentication failedpublic User validatePassword(java.lang.String id, char[] password, ReadOptions opts) throws IDSException, EntityNotFoundException, EntityNotUniqueException, OperationNotSupportedException, AuthenticationException
id - Id attribute value. ID attribute is defined in the entity configuration that uniquely identifies the user entitypassword - User password to be validatedopts - Read operation optionsIDSException - Generic Identity Directory Service exceptionEntityNotFoundException - When no user found for given ID valueEntityNotUniqueException - If the given ID value does not uniquely identify the userOperationNotSupportedException - If the user authentication operation is not supportedAuthenticationException - If user authentication failedpublic User validatePassword(java.lang.String id, char[] password, ReadOptions opts, boolean checkPwdPolicyWarning) throws IDSException, EntityNotFoundException, EntityNotUniqueException, OperationNotSupportedException, AuthenticationWarningException, AuthenticationException
id - Id attribute value. ID attribute is defined in the entity configuration that uniquely identifies the user entitypassword - User password to be validatedopts - Read operation optionscheckPwdPolicyWarning - If true and there are any password policy related warnings throws AuthenticationWarningExceptionIDSException - Generic Identity Directory Service exceptionEntityNotFoundException - When no user found for given ID valueEntityNotUniqueException - If the given ID value does not uniquely identify the userOperationNotSupportedException - If the user authentication operation is not supportedAuthenticationWarningException - If there are any password policy related warnings like Password must change, Grace Login, Password expire, etcAuthenticationException - If user authentication failedpublic User validatePassword(java.lang.String attrName, java.lang.String attrVal, char[] password, ReadOptions opts) throws IDSException, EntityNotFoundException, EntityNotUniqueException, OperationNotSupportedException, AuthenticationException
attrName - Name of the attribute that uniquely identifies the userattrVal - Attribute valuepassword - User password to be validatedopts - Read operation optionsIDSException - Generic Identity Directory Service exceptionEntityNotFoundException - When no user found for given ID valueEntityNotUniqueException - If the given ID value does not uniquely identify the userOperationNotSupportedException - If the user authentication operation is not supportedAuthenticationException - If user authentication failedpublic User validatePassword(java.lang.String attrName, java.lang.String attrVal, char[] password, ReadOptions opts, boolean checkPwdPolicyWarning) throws IDSException, EntityNotFoundException, EntityNotUniqueException, OperationNotSupportedException, AuthenticationWarningException, AuthenticationException
attrName - Name of the attribute that uniquely identifies the userattrVal - Attribute valuepassword - User password to be validatedopts - Read operation optionscheckPwdPolicyWarning - If true and there are any password policy related warnings throws AuthenticationWarningExceptionIDSException - Generic Identity Directory Service exceptionEntityNotFoundException - When no user found for given ID valueEntityNotUniqueException - If the given ID value does not uniquely identify the userOperationNotSupportedException - If the user authentication operation is not supportedAuthenticationWarningException - If there are any password policy related warnings like Password must change, Grace Login, Password expire, etcAuthenticationException - If user authentication failedpublic boolean validatePassword(java.security.Principal principal,
char[] password)
throws IDSException,
EntityNotFoundException,
OperationNotSupportedException,
AuthenticationException
principal - Principal identifier of the userpassword - User passwordIDSException - Generic Identity Directory Service exceptionEntityNotFoundException - When no user found for given ID valueOperationNotSupportedException - If the user authenticate operation is not supportedAuthenticationException - If user authentication failedpublic boolean validatePassword(java.security.Principal principal,
char[] password,
boolean checkPwdPolicyWarning)
throws IDSException,
EntityNotFoundException,
OperationNotSupportedException,
AuthenticationWarningException,
AuthenticationException
principal - Principal identifier of the userpassword - User passwordcheckPwdPolicyWarning - If true and there are any password policy related warnings throws AuthenticationWarningExceptionIDSException - Generic Identity Directory Service exceptionEntityNotFoundException - When no user found for given ID valueOperationNotSupportedException - If the user authenticate operation is not supportedAuthenticationWarningException - If there are any password policy related warnings like Password must change, Grace Login, Password expire, etcAuthenticationException - If user authentication failedpublic void changePassword(java.security.Principal principal,
char[] oldPassword,
char[] newPassword,
ModifyOptions opts)
throws AuthenticationException,
OperationNotSupportedException,
EntityNotFoundException,
AuthorizationException,
PasswordPolicyException,
IDSException
principal - Principal identifier of the useroldPassword - Old password of the usernewPassword - New password of the useropts - Modify optionsIDSException - Generic Identity Directory Service exceptionEntityNotFoundException - When this user is not foundOperationNotSupportedException - If the user authenticate operation is not supportedAuthenticationException - If user authentication failedPasswordPolicyException - If there are any password policy errorsAuthorizationException - If user does not have sufficient privilegespublic void changePassword(java.lang.String id,
char[] oldPassword,
char[] newPassword,
ModifyOptions opts)
throws AuthenticationException,
OperationNotSupportedException,
EntityNotFoundException,
AuthorizationException,
PasswordPolicyException,
IDSException
id - Id attribute value. ID attribute is defined in the entity configuration that uniquely identifies the user entityoldPassword - Old password of the usernewPassword - New password of the useropts - Modify optionsIDSException - Generic Identity Directory Service exceptionEntityNotFoundException - When this user is not foundOperationNotSupportedException - If the user authenticate operation is not supportedAuthenticationException - If user authentication failedPasswordPolicyException - If there are any password policy errorsAuthorizationException - If user does not have sufficient privilegespublic void changePassword(java.lang.String attrName,
java.lang.String attrVal,
char[] oldPassword,
char[] newPassword,
ModifyOptions opts)
throws AuthenticationException,
OperationNotSupportedException,
EntityNotFoundException,
AuthorizationException,
PasswordPolicyException,
IDSException
attrName - Name of the attribute that uniquely identifies the userattrVal - Attribute valueoldPassword - Old password of the usernewPassword - New password of the useropts - Modify optionsIDSException - Generic Identity Directory Service exceptionEntityNotFoundException - When this user is not foundOperationNotSupportedException - If the user authenticate operation is not supportedAuthenticationException - If user authentication failedPasswordPolicyException - If there are any password policy errorsAuthorizationException - If user does not have sufficient privilegespublic void resetPassword(java.security.Principal principal,
char[] password,
ModifyOptions opts)
throws OperationNotSupportedException,
EntityNotFoundException,
AuthorizationException,
PasswordPolicyException,
IDSException
principal - Principal identifier of the userpassword - User's new passwordopts - Modify optionsIDSException - Generic Identity Directory Service exceptionEntityNotFoundException - When this user is not foundOperationNotSupportedException - If the user authenticate operation is not supportedPasswordPolicyException - If there are any password policy errorsAuthorizationException - If user does not have sufficient privilegespublic void resetPassword(java.lang.String id,
char[] password,
ModifyOptions opts)
throws OperationNotSupportedException,
EntityNotFoundException,
AuthorizationException,
PasswordPolicyException,
IDSException
id - Id attribute value. ID attribute is defined in the entity configuration that uniquely identifies the user entitypassword - User's new passwordopts - Modify optionsIDSException - Generic Identity Directory Service exceptionEntityNotFoundException - When this user is not foundOperationNotSupportedException - If the user authenticate operation is not supportedPasswordPolicyException - If there are any password policy errorsAuthorizationException - If user does not have sufficient privilegespublic void resetPassword(java.lang.String attrName,
java.lang.String attrVal,
char[] password,
ModifyOptions opts)
throws OperationNotSupportedException,
EntityNotFoundException,
AuthorizationException,
PasswordPolicyException,
IDSException
attrName - Name of the attribute that uniquely identifies the userattrVal - Attribute valuepassword - User's new passwordopts - Modify optionsIDSException - Generic Identity Directory Service exceptionEntityNotFoundException - When this user is not foundOperationNotSupportedException - If the user authenticate operation is not supportedPasswordPolicyException - If there are any password policy errorsAuthorizationException - If user does not have sufficient privilegespublic UserCapabilities getCapabilities()