Class MfaAuthenticationProvider
java.lang.Object
org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider
org.springframework.security.authentication.dao.DaoAuthenticationProvider
nl._42.restsecure.autoconfigure.authentication.mfa.MfaAuthenticationProvider
- All Implemented Interfaces:
org.springframework.beans.factory.Aware
,org.springframework.beans.factory.InitializingBean
,org.springframework.context.MessageSourceAware
,org.springframework.security.authentication.AuthenticationProvider
public class MfaAuthenticationProvider
extends org.springframework.security.authentication.dao.DaoAuthenticationProvider
An
DaoAuthenticationProvider
that supports Multi-Factor authentication (MFA, 2FA) using Time-based One-Time-Password (TOTP).-
Field Summary
Fields inherited from class org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider
hideUserNotFoundExceptions, logger, messages
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
additionalAuthenticationChecks
(org.springframework.security.core.userdetails.UserDetails userDetails, org.springframework.security.authentication.UsernamePasswordAuthenticationToken authentication) protected void
void
setMfaValidationService
(MfaValidationService mfaValidationService) void
setVerificationChecks
(List<MfaVerificationCheck> verificationChecks) boolean
Methods inherited from class org.springframework.security.authentication.dao.DaoAuthenticationProvider
createSuccessAuthentication, getPasswordEncoder, getUserDetailsService, retrieveUser, setPasswordEncoder, setUserDetailsPasswordService, setUserDetailsService
Methods inherited from class org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider
afterPropertiesSet, authenticate, getPostAuthenticationChecks, getPreAuthenticationChecks, getUserCache, isForcePrincipalAsString, isHideUserNotFoundExceptions, setAuthoritiesMapper, setForcePrincipalAsString, setHideUserNotFoundExceptions, setMessageSource, setPostAuthenticationChecks, setPreAuthenticationChecks, setUserCache
-
Field Details
-
SERVER_MFA_CODE_REQUIRED_ERROR
- See Also:
-
DETAILS_MFA_SETUP_REQUIRED
- See Also:
-
-
Constructor Details
-
MfaAuthenticationProvider
public MfaAuthenticationProvider()
-
-
Method Details
-
setVerificationChecks
-
setMfaValidationService
-
doAfterPropertiesSet
protected void doAfterPropertiesSet()- Overrides:
doAfterPropertiesSet
in classorg.springframework.security.authentication.dao.DaoAuthenticationProvider
-
additionalAuthenticationChecks
protected void additionalAuthenticationChecks(org.springframework.security.core.userdetails.UserDetails userDetails, org.springframework.security.authentication.UsernamePasswordAuthenticationToken authentication) throws org.springframework.security.core.AuthenticationException - Overrides:
additionalAuthenticationChecks
in classorg.springframework.security.authentication.dao.DaoAuthenticationProvider
- Throws:
org.springframework.security.core.AuthenticationException
-
supports
- Specified by:
supports
in interfaceorg.springframework.security.authentication.AuthenticationProvider
- Overrides:
supports
in classorg.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider
-