public class Sha1PasswordHandler extends Object implements PasswordHandler
| Constructor and Description |
|---|
Sha1PasswordHandler(AuthSubject authSubject) |
| Modifier and Type | Method and Description |
|---|---|
String |
getPasswordResetDigest()
Returns a digest which can be used for the "Forgot password?" function.
|
boolean |
isValidPassword(String password)
Checks whether the password is valid.
|
boolean |
isValidPasswordResetDigest(String digest)
Checks whether the digest is valid.
|
void |
migrate(CoreService service,
String password)
Migrates passwords of the current
PasswordHandler instance to passwords handled by
CoreService.getDefaultPasswordHandler(org.appng.api.model.AuthSubject). |
void |
savePassword(String password)
Hashes and persists the password.
|
void |
updateSubject(CoreService service)
Updates the
SubjectImpl instance in the database. |
public Sha1PasswordHandler(AuthSubject authSubject)
public void savePassword(String password)
PasswordHandlersavePassword in interface PasswordHandlerpassword - The cleartext password.public boolean isValidPassword(String password)
PasswordHandlerisValidPassword in interface PasswordHandlerpassword - The cleartext password.public String getPasswordResetDigest()
PasswordHandlergetPasswordResetDigest in interface PasswordHandlerpublic boolean isValidPasswordResetDigest(String digest)
PasswordHandlerisValidPasswordResetDigest in interface PasswordHandlerdigest - The digest.public void updateSubject(CoreService service) throws BusinessException
PasswordHandlerSubjectImpl instance in the database. Must be called if modifications have been made to the
instance of AuthSubject / SubjectImpl by methods of this interface and the instance is not
updated later during the same transaction.updateSubject in interface PasswordHandlerservice - The CoreService instance.BusinessException - Throws a BusinessException if the SubjectImpl can not be updated.@Transactional public void migrate(CoreService service, String password)
PasswordHandlerPasswordHandler instance to passwords handled by
CoreService.getDefaultPasswordHandler(org.appng.api.model.AuthSubject).migrate in interface PasswordHandlerservice - Instance of CoreServicepassword - The current password.Copyright © 2011–2018 aiticon GmbH. All rights reserved.