Class UpgradePasswordHashUseCase

java.lang.Object
com.irurueta.authserver.authorization.application.password.UpgradePasswordHashUseCase

@Service @Transactional public class UpgradePasswordHashUseCase extends Object
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 Details

    • userAccountRepository

      private final UserAccountRepository userAccountRepository
      Port that stores the accounts.
  • Constructor Details

    • UpgradePasswordHashUseCase

      public UpgradePasswordHashUseCase()
  • Method Details

    • replaceHash

      public void replaceHash(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).
      Parameters:
      account - the account that just signed in.
      encodedPassword - the new encoded password.