Search in sources :

Example 1 with GoogleAuthenticatorMultifactorAuthenticationProvider

use of org.apereo.cas.adaptors.gauth.GoogleAuthenticatorMultifactorAuthenticationProvider in project cas by apereo.

the class GoogleAuthenticatorAuthenticationEventExecutionPlanConfiguration method googleAuthenticatorAuthenticationProvider.

@Bean
@RefreshScope
public MultifactorAuthenticationProvider googleAuthenticatorAuthenticationProvider() {
    final MultifactorAuthenticationProperties.GAuth 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;
}
Also used : GoogleAuthenticatorMultifactorAuthenticationProvider(org.apereo.cas.adaptors.gauth.GoogleAuthenticatorMultifactorAuthenticationProvider) MultifactorAuthenticationProperties(org.apereo.cas.configuration.model.support.mfa.MultifactorAuthenticationProperties) RefreshScope(org.springframework.cloud.context.config.annotation.RefreshScope) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean)

Aggregations

GoogleAuthenticatorMultifactorAuthenticationProvider (org.apereo.cas.adaptors.gauth.GoogleAuthenticatorMultifactorAuthenticationProvider)1 MultifactorAuthenticationProperties (org.apereo.cas.configuration.model.support.mfa.MultifactorAuthenticationProperties)1 ConditionalOnMissingBean (org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean)1 RefreshScope (org.springframework.cloud.context.config.annotation.RefreshScope)1 Bean (org.springframework.context.annotation.Bean)1