Class PasswordResetCallback
java.lang.Object
org.wildfly.security.auth.callback.PasswordResetCallback
- All Implemented Interfaces:
Serializable,Callback,ExtendedCallback
A callback used when a password reset is required. Interactive callback handlers should have the user enter the
password two times, comparing them for equality.
- Author:
- David M. Lloyd
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClear the stored password bytes by setting them to' '.char[]Get the new password.Get the password reset prompt.booleanDetermine if this callback is optional.booleanDetermine if this callback is requesting information.voidsetPassword(char[] password) Set the new password.
-
Constructor Details
-
PasswordResetCallback
Construct a new instance.- Parameters:
prompt- the password reset prompt (must not benullor empty)
-
-
Method Details
-
getPrompt
Get the password reset prompt.- Returns:
- the password reset prompt
-
getPassword
public char[] getPassword()Get the new password.- Returns:
- the new password, or
nullif it was not set
-
setPassword
public void setPassword(char[] password) Set the new password.- Parameters:
password- the new password
-
clearPassword
public void clearPassword()Clear the stored password bytes by setting them to' '. -
isOptional
public boolean isOptional()Description copied from interface:ExtendedCallbackDetermine if this callback is optional.- Specified by:
isOptionalin interfaceExtendedCallback- Returns:
trueif the callback is optional,falseif it is mandatory
-
needsInformation
public boolean needsInformation()Description copied from interface:ExtendedCallbackDetermine if this callback is requesting information.- Specified by:
needsInformationin interfaceExtendedCallback- Returns:
trueif the callback is requesting information,falseif it is only providing information
-