Package org.eclipse.net4j.util.security
Interface IAuthenticator2
- All Superinterfaces:
AdministrationPredicate,IAuthenticator
Extension interface for authenticators that can update user credentials in addition to authenticating them.
- Since:
- 3.4
- Author:
- Christian W. Damus (CEA LIST)
-
Method Summary
Modifier and TypeMethodDescriptionbooleanisAdministrator(String userID) Queries whether a given user has administrative privileges.voidresetPassword(String adminID, char[] adminPassword, String userID, char[] newPassword) Performs an administrative resets of the password stored for the user identified byuserID.voidupdatePassword(String userID, char[] oldPassword, char[] newPassword) Updates the password stored for the user identified byuserID.Methods inherited from interface org.eclipse.net4j.util.security.IAuthenticator
authenticate
-
Method Details
-
updatePassword
Updates the password stored for the user identified byuserID. TheoldPasswordis authenticated as per usual and is replaced by thenewPasswordonly (and atomically) on success.- Parameters:
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 theoldPassword- Throws:
SecurityException- on any failure to authenticate theoldPasswordor validate and/or set thenewPassword
-
resetPassword
Performs an administrative resets of the password stored for the user identified byuserID. TheadminIDandadminPasswordmust authenticate to permit theuserID's password to be set to thenewPassword.- Parameters:
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 password- Throws:
SecurityException- on any failure to authenticate theoldPasswordor validate and/or set thenewPassword
-
isAdministrator
Queries whether a given user has administrative privileges.- Specified by:
isAdministratorin interfaceAdministrationPredicate- Parameters:
userID- an user ID, which may or may not exist- Returns:
- whether the userID exists and has administrative privileges
-