public interface PasswordHandler
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ATTR_PASSWORD
Script attribute: the password value to check
|
static java.lang.String |
ATTR_PASSWORD_TYPE
Script attribute: the password type being checked
|
static java.lang.String |
ATTR_USER
Script attribute: the user to check password
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkConfirmationPassword(java.lang.String password)
Checks the confirmation password for the logged user, if used
|
void |
checkPassword(boolean forLogin,
PasswordType type,
BasicUser user,
java.lang.String password)
Checks the password for the given user, doing different checks if it's for login
|
void |
checkPassword(PasswordType type,
BasicUser user,
java.lang.String password)
Checks the password for the given user
|
java.lang.String |
encode(BasicUser user,
PasswordType passwordType,
java.lang.String value)
Encodes the password according to its type
|
PasswordInputDTO |
getConfirmationPasswordInput()
Returns the input for the confirmation password for the logged user
|
PasswordType |
getConfirmationPasswordType()
Returns the password type used to confirm operations for the logged user
|
PasswordInputDTO |
getPasswordInput(BasicUser basicUser,
PasswordType passwordType)
Returns the password input information for the given user and password type
|
PasswordInputDTO |
getPasswordInput(PasswordType passwordType)
Returns the password input information for the logged user and the given password type
|
java.util.Set<PasswordType> |
getPasswordTypesAtRegistration(Group group,
UserRegistration registration,
PasswordMode mode)
Returns a set of
PasswordType marked to be saved at registration for the specified group and registration
type. |
boolean |
matches(Password password,
java.lang.String plainPassword)
Returns whether the given plain password matches the stored password
|
void |
notifyPasswordStatusChanged(PasswordType type,
BasicUser user,
PasswordStatus status)
Notifies the user that a password has changed its status
|
static final java.lang.String ATTR_USER
static final java.lang.String ATTR_PASSWORD_TYPE
static final java.lang.String ATTR_PASSWORD
void checkConfirmationPassword(java.lang.String password)
throws PasswordException
PasswordExceptionvoid checkPassword(boolean forLogin,
PasswordType type,
BasicUser user,
java.lang.String password)
throws PasswordException
PasswordExceptionvoid checkPassword(PasswordType type, BasicUser user, java.lang.String password) throws PasswordException
PasswordExceptionjava.lang.String encode(BasicUser user, PasswordType passwordType, java.lang.String value)
PasswordInputDTO getConfirmationPasswordInput()
PasswordType getConfirmationPasswordType()
PasswordInputDTO getPasswordInput(BasicUser basicUser, PasswordType passwordType)
PasswordInputDTO getPasswordInput(PasswordType passwordType)
java.util.Set<PasswordType> getPasswordTypesAtRegistration(Group group, UserRegistration registration, PasswordMode mode)
PasswordType marked to be saved at registration for the specified group and registration
type.group - the group the user will be registeredregistration - if UserRegistration.PUBLIC then it will read from the group's product. Otherwise it
will read from the logged user's products.mode - a filter (Optional) Only PasswordMode.MANUAL and PasswordMode.GENERATED are
supported.boolean matches(Password password, java.lang.String plainPassword)
void notifyPasswordStatusChanged(PasswordType type, BasicUser user, PasswordStatus status)