use of org.apereo.cas.configuration.model.support.mfa.GAuthMultifactorProperties in project cas by apereo.
the class GoogleAuthenticatorAuthenticationEventExecutionPlanConfiguration method googleAuthenticatorAuthenticationProvider.
@Bean
@RefreshScope
public MultifactorAuthenticationProvider googleAuthenticatorAuthenticationProvider() {
final GAuthMultifactorProperties gauth = casProperties.getAuthn().getMfa().getGauth();
final GoogleAuthenticatorMultifactorAuthenticationProvider p = new GoogleAuthenticatorMultifactorAuthenticationProvider();
p.setBypassEvaluator(googleBypassEvaluator());
p.setGlobalFailureMode(casProperties.getAuthn().getMfa().getGlobalFailureMode());
p.setOrder(gauth.getRank());
p.setId(gauth.getId());
return p;
}
use of org.apereo.cas.configuration.model.support.mfa.GAuthMultifactorProperties in project cas by apereo.
the class GoogleAuthenticatorAuthenticationEventExecutionPlanConfiguration method googleAuthenticatorInstance.
@Bean
public IGoogleAuthenticator googleAuthenticatorInstance() {
final GAuthMultifactorProperties gauth = casProperties.getAuthn().getMfa().getGauth();
final GoogleAuthenticatorConfig.GoogleAuthenticatorConfigBuilder bldr = new GoogleAuthenticatorConfig.GoogleAuthenticatorConfigBuilder();
bldr.setCodeDigits(gauth.getCodeDigits());
bldr.setTimeStepSizeInMillis(TimeUnit.SECONDS.toMillis(gauth.getTimeStepSize()));
bldr.setWindowSize(gauth.getWindowSize());
bldr.setKeyRepresentation(KeyRepresentation.BASE32);
return new GoogleAuthenticator(bldr.build());
}
Aggregations