Class SecondFactorUserResolver
java.lang.Object
com.irurueta.authserver.authorization.api.web.mfa.SecondFactorUserResolver
Resolves the identifier of the account of a signed-in user. The principal Spring Security keeps after a password
sign-in carries only the username, while the second-factor use cases work with the account identifier.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final FindUserAccountUseCaseUse case that looks the account up. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
findUserAccountUseCase
Use case that looks the account up.
-
-
Constructor Details
-
SecondFactorUserResolver
public SecondFactorUserResolver()
-
-
Method Details
-
userIdOf
Gets the identifier of an account.- Parameters:
username- name the user signed in with.- Returns:
- the identifier of the account.
- Throws:
org.springframework.security.core.userdetails.UsernameNotFoundException- if there is no such account.
-