Class UserAccountUserDetailsService

java.lang.Object
com.irurueta.authserver.authorization.api.web.password.UserAccountUserDetailsService
All Implemented Interfaces:
org.springframework.security.core.userdetails.UserDetailsPasswordService, org.springframework.security.core.userdetails.UserDetailsService

@Component public class UserAccountUserDetailsService extends Object implements org.springframework.security.core.userdetails.UserDetailsService, org.springframework.security.core.userdetails.UserDetailsPasswordService
Spring Security UserDetailsService adapter over the FindUserAccountUseCase use case: it maps the domain UserAccount onto Spring Security's UserDetails through the UserDetailsMapper. As a UserDetailsPasswordService it also stores the stronger hash that the authentication provider produces after a successful sign-in with an outdated encoding, through the UpgradePasswordHashUseCase use case.
  • Field Details

    • findUserAccountUseCase

      private final FindUserAccountUseCase findUserAccountUseCase
      Use case that looks the account up.
    • upgradePasswordHashUseCase

      private final UpgradePasswordHashUseCase upgradePasswordHashUseCase
      Use case that stores the upgraded hash.
    • userDetailsMapper

      private final UserDetailsMapper userDetailsMapper
      Maps an account onto Spring Security's user details.
  • Constructor Details

    • UserAccountUserDetailsService

      public UserAccountUserDetailsService()
  • Method Details

    • loadUserByUsername

      public org.springframework.security.core.userdetails.UserDetails loadUserByUsername(String username) throws org.springframework.security.core.userdetails.UsernameNotFoundException
      Specified by:
      loadUserByUsername in interface org.springframework.security.core.userdetails.UserDetailsService
      Throws:
      org.springframework.security.core.userdetails.UsernameNotFoundException
    • updatePassword

      public org.springframework.security.core.userdetails.UserDetails updatePassword(org.springframework.security.core.userdetails.UserDetails user, String newPassword)
      Specified by:
      updatePassword in interface org.springframework.security.core.userdetails.UserDetailsPasswordService