Class UpgradePasswordHashUseCase
java.lang.Object
com.irurueta.authserver.authorization.application.password.UpgradePasswordHashUseCase
Use case that replaces the stored password hash of a user with one made by the current algorithm, right after a
successful sign-in (the only moment the clear-text password is known). The authentication framework decides that
the stored encoding is outdated and re-encodes the verified password itself; this use case only stores the result.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final UserAccountRepositoryPort that stores the accounts. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidreplaceHash(UserAccount account, String encodedPassword) Stores a password hash that was already produced by the current algorithm, as the authentication framework does after a sign-in (it re-encodes the verified clear-text password itself).
-
Field Details
-
userAccountRepository
Port that stores the accounts.
-
-
Constructor Details
-
UpgradePasswordHashUseCase
public UpgradePasswordHashUseCase()
-
-
Method Details
-
replaceHash
Stores a password hash that was already produced by the current algorithm, as the authentication framework does after a sign-in (it re-encodes the verified clear-text password itself).- Parameters:
account- the account that just signed in.encodedPassword- the new encoded password.
-