Class MfaConfiguration
java.lang.Object
com.irurueta.authserver.authorization.application.mfa.MfaConfiguration
@Configuration(proxyBeanMethods=false)
@EnableConfigurationProperties(MfaProperties.class)
public class MfaConfiguration
extends Object
Exposes the domain collaborators of the multi-factor use cases as beans, so no use case creates them and a
deployment (or a test) can replace any of them, and binds the
MfaProperties.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionBuilds the policy that decides which factors are enough and when a second factor is required.Builds the generator of TOTP shared secrets.Builds the TOTP algorithm (RFC 6238, HMAC-SHA1, 30 seconds, 6 digits).
-
Constructor Details
-
MfaConfiguration
public MfaConfiguration()
-
-
Method Details
-
secretGenerator
Builds the generator of TOTP shared secrets.- Returns:
- the generator (160-bit secrets from a
SecureRandom).
-
totpAlgorithm
Builds the TOTP algorithm (RFC 6238, HMAC-SHA1, 30 seconds, 6 digits).- Returns:
- the algorithm.
-
mfaPolicy
Builds the policy that decides which factors are enough and when a second factor is required.- Returns:
- the policy.
-