Class MfaTotpVerificationCheck
java.lang.Object
nl._42.restsecure.autoconfigure.authentication.mfa.MfaTotpVerificationCheck
- All Implemented Interfaces:
MfaVerificationCheck
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
validate
(RegisteredUser user, MfaAuthenticationToken authenticationToken) Validates the MFA Authentication credentials for the given RegisteredUser.
-
Constructor Details
-
MfaTotpVerificationCheck
-
-
Method Details
-
validate
public boolean validate(RegisteredUser user, MfaAuthenticationToken authenticationToken) throws org.springframework.security.core.AuthenticationException Description copied from interface:MfaVerificationCheck
Validates the MFA Authentication credentials for the given RegisteredUser. If the credentials are valid, return true. The user will be logged in and no further checks will take place. If this check is not applicable for this user, return false. The next check will then be tried. If the credentials are not valid (but this check *is* applicable for this user), throw an AuthenticationException.- Specified by:
validate
in interfaceMfaVerificationCheck
- Parameters:
user
- User that is trying to log in.authenticationToken
- Supplied authentication credentials (username, password, MFA token)- Returns:
- Returns true if this authentication is valid
- Throws:
org.springframework.security.core.AuthenticationException
- if the supplied credentials are not valid
-