Class FactorGrantor
java.lang.Object
com.irurueta.authserver.authorization.api.web.mfa.FactorGrantor
Adds the authority of a verified factor to an authentication. Authentications are immutable, so a new one is built
that keeps the principal and the authorities of the original and carries the new factor, stamped with the current
time (which is what
auth_time and max_age are measured with).-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
clock
Source of the current time.
-
-
Constructor Details
-
FactorGrantor
public FactorGrantor()
-
-
Method Details
-
grant
public org.springframework.security.core.Authentication grant(org.springframework.security.core.Authentication authentication, String authority) Grants a factor.- Parameters:
authentication- the authentication to start from.authority- authority of the factor (FACTOR_prefix included).- Returns:
- a new authentication with the factor added; the same one when it already holds it.
-