Search in sources :

Example 1 with CasSimpleMultifactorAuthenticationProvider

use of org.apereo.cas.mfa.simple.CasSimpleMultifactorAuthenticationProvider in project cas by apereo.

the class CasSimpleMultifactorAuthenticationEventExecutionPlanConfiguration method casSimpleMultifactorAuthenticationProvider.

@Bean
@RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
@ConditionalOnMissingBean(name = "casSimpleMultifactorAuthenticationProvider")
public MultifactorAuthenticationProvider casSimpleMultifactorAuthenticationProvider(@Qualifier("casSimpleMultifactorBypassEvaluator") final MultifactorAuthenticationProviderBypassEvaluator casSimpleMultifactorBypassEvaluator, @Qualifier("failureModeEvaluator") final MultifactorAuthenticationFailureModeEvaluator failureModeEvaluator, final CasConfigurationProperties casProperties) {
    val simple = casProperties.getAuthn().getMfa().getSimple();
    val p = new CasSimpleMultifactorAuthenticationProvider();
    p.setBypassEvaluator(casSimpleMultifactorBypassEvaluator);
    p.setFailureMode(simple.getFailureMode());
    p.setFailureModeEvaluator(failureModeEvaluator);
    p.setOrder(simple.getRank());
    p.setId(simple.getId());
    return p;
}
Also used : lombok.val(lombok.val) CasSimpleMultifactorAuthenticationProvider(org.apereo.cas.mfa.simple.CasSimpleMultifactorAuthenticationProvider) RefreshScope(org.springframework.cloud.context.config.annotation.RefreshScope) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) ConditionalOnMissingBean(org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean) Bean(org.springframework.context.annotation.Bean)

Aggregations

lombok.val (lombok.val)1 CasSimpleMultifactorAuthenticationProvider (org.apereo.cas.mfa.simple.CasSimpleMultifactorAuthenticationProvider)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