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(boolean changeSecondaryPassword)
Returns data for change the main/secondary access password
|
UserPasswordsData |
getData(UserLocatorVO locator)
Returns data for user passwords
|
SetSecurityQuestionData |
getSetSecurityQuestionData()
Returns data used to set the security question
|
java.util.List<java.lang.String> |
requestNewOTP(SendMedium 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.
|
java.util.List<java.lang.String> |
requestNewOTPForSecondaryPassword(SendMedium medium)
Same as
requestNewOTP(SendMedium) but using the secondary 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(ResetAndSendPasswordDTO 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(@NotNull
PasswordTypeVO passwordType)
throws FrameworkException
IllegalActionException - When the given password type is not generated, or is not in the pending stateFrameworkExceptionvoid allowActivation(@NotNull
PasswordActionDTO params)
throws FrameworkException
IllegalActionException - When the given password is not generated / doesn't apply to the given userFrameworkExceptionvoid change(@NotNull
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(@NotNull
ChangeForgottenPasswordDTO dto)
throws FrameworkException,
InvalidSecurityAnswerException
ValidationException - When the given new password is invalid according to the constraintsFrameworkExceptionInvalidSecurityAnswerExceptionvoid disable(@NotNull
PasswordActionDTO params)
throws FrameworkException
IllegalActionException - When the current password cannot be disabled (for example, is already disabled)FrameworkExceptionvoid enable(@NotNull
PasswordActionDTO params)
throws FrameworkException
IllegalActionException - When the current password cannot be enabled (not in the disabled state)FrameworkExceptionvoid forgotPasswordRequest(@NotNull
ForgotPasswordRequestDTO params)
throws FrameworkException,
RemoteAddressBlockedException
java.lang.String generateNew(@NotNull
ChangeGeneratedPasswordDTO params)
throws FrameworkException
FrameworkExceptionChangeForgottenPasswordData getChangeForgottenPasswordData(@NotNull java.lang.String validationKey) throws FrameworkException
FrameworkExceptionChangePasswordData getChangePasswordData(boolean changeSecondaryPassword) throws FrameworkException
FrameworkExceptionUserPasswordsData getData(@NotNull UserLocatorVO locator) throws FrameworkException
FrameworkExceptionSetSecurityQuestionData getSetSecurityQuestionData() throws FrameworkException
FrameworkExceptionjava.util.List<java.lang.String> requestNewOTP(@NotNull
SendMedium medium)
throws FrameworkException,
SmsSendingException
medium - the medium used to send the OTP.SmsSendingException - only if medium is SendMedium.SMS and the OTP could not be sent to any
enabled for sms phone.FrameworkExceptionjava.util.List<java.lang.String> requestNewOTPForSecondaryPassword(SendMedium medium) throws FrameworkException, SmsSendingException
requestNewOTP(SendMedium) but using the secondary password type configured in the current
channel for the logged user.void reset(@NotNull
PasswordActionDTO params)
throws FrameworkException
FrameworkExceptionvoid resetAndSend(@NotNull
ResetAndSendPasswordDTO params)
throws FrameworkException
PasswordStatus.RESET, forcing the user to change it.FrameworkExceptionvoid resetSecurityQuestion(@NotNull
UserLocatorVO locator)
throws FrameworkException
FrameworkExceptionvoid setSecurityQuestion(@NotNull
SetSecurityQuestionDTO params)
throws FrameworkException
FrameworkExceptionvoid unblock(@NotNull
PasswordActionDTO params)
throws FrameworkException
IllegalActionException - When the given password is not blocked / doesn't apply to the given userFrameworkException