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 Summary
FieldsModifier and TypeFieldDescriptionprivate final FindUserAccountUseCaseUse case that looks the account up.private final UpgradePasswordHashUseCaseUse case that stores the upgraded hash.private final UserDetailsMapperMaps an account onto Spring Security's user details.Fields inherited from interface org.springframework.security.core.userdetails.UserDetailsPasswordService
NOOP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.core.userdetails.UserDetailsloadUserByUsername(String username) org.springframework.security.core.userdetails.UserDetailsupdatePassword(org.springframework.security.core.userdetails.UserDetails user, String newPassword)
-
Field Details
-
findUserAccountUseCase
Use case that looks the account up. -
upgradePasswordHashUseCase
Use case that stores the upgraded hash. -
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:
loadUserByUsernamein interfaceorg.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:
updatePasswordin interfaceorg.springframework.security.core.userdetails.UserDetailsPasswordService
-