public interface PasswordService extends Service
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
activate(PasswordTypeVO passwordType)
Activates the generated password a new password for the current user
|
void |
allowActivation(PasswordActionDTO params)
Allows the given user to activate the given generated and pending password
|
void |
change(ChangePasswordDTO dto)
Manually changes a password
|
void |
changeForgottenPassword(ChangeForgottenPasswordDTO dto)
Changes a forgotten password, or resets it, in case of manual password
|
void |
disable(PasswordActionDTO params)
Disables a password.
|
void |
enable(PasswordActionDTO params)
Enables a disabled password.
|
void |
forgotPasswordRequest(ForgotPasswordRequestDTO params)
Initiates the forgot password operation,
allowing the user to set another password based on an e-mail token and security question verification.
|
java.lang.String |
generateNew(ChangeGeneratedPasswordDTO params)
Allows to change a generated password by generating a new one
|
ChangeForgottenPasswordData |
getChangeForgottenPasswordData(java.lang.String validationKey)
Returns data for a forgot password change request
|
ChangePasswordData |
getChangePasswordData()
Returns data for change the main login password
|
UserPasswordsData |
getData(UserLocatorVO locator)
Returns data for user passwords
|
java.util.List<java.lang.String> |
requestNewOTP(OTPSendMedium medium)
Generates a new OTP (removing any previous password, if any) and sends it by the specified medium using the
confirmation password type
configured in the current channel for the logged user.
|
void |
reset(PasswordActionDTO params)
Resets the given generated password and allow it to be activated again
|
void |
resetAndSend(PasswordActionDTO params)
Generates a new value of a manual password and send it to the user (for example, via e-mail).
|
void |
resetSecurityQuestion(UserLocatorVO locator)
Resets the security question, forcing the user to set a new one in the next login
|
void |
setSecurityQuestion(SetSecurityQuestionDTO params)
Sets the security question's answer for the logged user
|
void |
unblock(PasswordActionDTO params)
Unblocks the given user password
|
java.lang.String activate(PasswordTypeVO passwordType) throws FrameworkException
IllegalActionException - When the given password type is not generated, or is not in the pending stateFrameworkExceptionvoid allowActivation(PasswordActionDTO params) throws FrameworkException
IllegalActionException - When the given password is not generated / doesn't apply to the given userFrameworkExceptionvoid change(ChangePasswordDTO dto) throws FrameworkException, PasswordException
PasswordException - The current password is invalidValidationException - When the given new password is invalid according to the constraintsIllegalActionException - When the current password cannot be changed (for example, it is generated)FrameworkExceptionvoid changeForgottenPassword(ChangeForgottenPasswordDTO dto) throws FrameworkException, InvalidSecurityAnswerException
ValidationException - When the given new password is invalid according to the constraintsFrameworkExceptionInvalidSecurityAnswerExceptionvoid disable(PasswordActionDTO params) throws FrameworkException
IllegalActionException - When the current password cannot be disabled (for example, is already disabled)FrameworkExceptionvoid enable(PasswordActionDTO params) throws FrameworkException
IllegalActionException - When the current password cannot be enabled (not in the disabled state)FrameworkExceptionvoid forgotPasswordRequest(ForgotPasswordRequestDTO params) throws FrameworkException, RemoteAddressBlockedException
java.lang.String generateNew(ChangeGeneratedPasswordDTO params) throws FrameworkException
FrameworkExceptionChangeForgottenPasswordData getChangeForgottenPasswordData(java.lang.String validationKey) throws FrameworkException
FrameworkExceptionChangePasswordData getChangePasswordData() throws FrameworkException
FrameworkExceptionUserPasswordsData getData(UserLocatorVO locator) throws FrameworkException
FrameworkExceptionjava.util.List<java.lang.String> requestNewOTP(OTPSendMedium medium) throws FrameworkException, SmsSendingException
medium - the medium used to send the OTP.SmsSendingException - only if medium is OTPSendMedium.BY_SMS and the OTP could not be sent to any
enabled for sms phone.FrameworkExceptionvoid reset(PasswordActionDTO params) throws FrameworkException
FrameworkExceptionvoid resetAndSend(PasswordActionDTO params) throws FrameworkException
FrameworkExceptionvoid resetSecurityQuestion(UserLocatorVO locator) throws FrameworkException
FrameworkExceptionvoid setSecurityQuestion(SetSecurityQuestionDTO params) throws FrameworkException
FrameworkExceptionvoid unblock(PasswordActionDTO params) throws FrameworkException
IllegalActionException - When the given password is not blocked / doesn't apply to the given userFrameworkException