public interface IAuthenticator2 extends IAuthenticator
Modifier and Type | Method and Description |
---|---|
boolean |
isAdministrator(String userID)
Queries whether a given user has administrative privileges.
|
void |
resetPassword(String adminID,
char[] adminPassword,
String userID,
char[] newPassword)
Performs an administrative resets of the password stored for the user identified by
userID . |
void |
updatePassword(String userID,
char[] oldPassword,
char[] newPassword)
Updates the password stored for the user identified by
userID . |
authenticate
void updatePassword(String userID, char[] oldPassword, char[] newPassword)
userID
. The oldPassword
is authenticated
as per usual and is replaced by the newPassword
only
(and atomically) on success.userID
- the ID of the user whose password is to be updatedoldPassword
- the user's current password attempt to verify against the stored passwordnewPassword
- the new password to replace the oldPassword
SecurityException
- on any failure to authenticate the oldPassword
or validate and/or set the newPassword
void resetPassword(String adminID, char[] adminPassword, String userID, char[] newPassword)
userID
.
The adminID
and adminPassword
must authenticate
to permit the userID
's password to be set to the newPassword
.adminID
- the ID of the administrator requesting the resetadminPassword
- the administrator's passworduserID
- the ID of the user whose password is to be resetnewPassword
- the new password to replace the user's old passwordSecurityException
- on any failure to authenticate the oldPassword
or validate and/or set the newPassword
boolean isAdministrator(String userID)
userID
- an user ID, which may or may not existCopyright (c) 2011-2015 Eike Stepper (Berlin, Germany) and others.