Class CurrentAccountResolver
java.lang.Object
com.irurueta.authserver.authorization.api.web.mfa.CurrentAccountResolver
Resolves the account of the request being handled. The interfaces generated from the contract carry only the
parameters the contract declares, so the principal of the bearer token is taken from the request context.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final SecondFactorUserResolverResolves the identifier of an account from its username. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionresolve()Gets the account of the current request.private CurrentAccountresolve(jakarta.servlet.http.HttpServletRequest request) Gets the account of the principal of a request.
-
Field Details
-
secondFactorUserResolver
Resolves the identifier of an account from its username.
-
-
Constructor Details
-
CurrentAccountResolver
public CurrentAccountResolver()
-
-
Method Details
-
resolve
Gets the account of the current request.- Returns:
- the account of the principal of the request.
- Throws:
org.springframework.security.core.userdetails.UsernameNotFoundException- if the principal has no account.
-
resolve
Gets the account of the principal of a request.- Parameters:
request- the request.- Returns:
- the account.
-