Package com.storedobject.core
Interface FallbackAuthenticator
- All Superinterfaces:
Authenticator
Unlike
Authenticator
, if this is plugged in as the external authenticator, it will be used only as
a fallback authenticator. That means, the Authenticator.login(StoredObject, char[])
and
Authenticator.login(StoredObject, char[], int)
methods will be invoked only if the internal authentication fails.
The methods changePassword(StoredObject, char[], char[])
and resetPassword(StoredObject)
are
never called.
If the internal authentication succeeds and it will still invoke the Authenticator.login(StoredObject, char[], int)
method to check the extra "authenticator code". In that case, the password passed will be null
.
- Author:
- Syam
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
changePassword
(StoredObject passwordOwner, char[] currentPassword, char[] newPassword) Change the current password to a new one.boolean
exists
(StoredObject passwordOwner) Check if the password owner exists.default boolean
resetPassword
(StoredObject passwordOwner) Reset the password to the initial default password.Methods inherited from interface com.storedobject.core.Authenticator
locked, login, login, loginFailed, unlocked
-
Method Details
-
changePassword
default boolean changePassword(StoredObject passwordOwner, char[] currentPassword, char[] newPassword) throws Exception Description copied from interface:Authenticator
Change the current password to a new one.- Specified by:
changePassword
in interfaceAuthenticator
- Parameters:
passwordOwner
- The password owner.currentPassword
- Current password.newPassword
- New password- Returns:
- True if changed successfully.
- Throws:
Exception
- If any exception occurred.
-
resetPassword
Description copied from interface:Authenticator
Reset the password to the initial default password.- Specified by:
resetPassword
in interfaceAuthenticator
- Parameters:
passwordOwner
- The password owner.- Returns:
- True if password reset is successful.
- Throws:
Exception
- If any exception occurred.
-
exists
Check if the password owner exists.- Parameters:
passwordOwner
- The password owner.- Returns:
- True/false.
-