Search in sources :

Example 1 with DefaultAuthenticationContextValidator

use of org.apereo.cas.authentication.DefaultAuthenticationContextValidator in project cas by apereo.

the class CasCoreAuthenticationSupportConfiguration method authenticationContextValidator.

@RefreshScope
@Bean
@ConditionalOnMissingBean(name = "authenticationContextValidator")
public AuthenticationContextValidator authenticationContextValidator() {
    final MultifactorAuthenticationProperties mfa = casProperties.getAuthn().getMfa();
    final String contextAttribute = mfa.getAuthenticationContextAttribute();
    final String failureMode = mfa.getGlobalFailureMode();
    final String authnAttributeName = mfa.getTrusted().getAuthenticationContextAttribute();
    return new DefaultAuthenticationContextValidator(contextAttribute, failureMode, authnAttributeName);
}
Also used : MultifactorAuthenticationProperties(org.apereo.cas.configuration.model.support.mfa.MultifactorAuthenticationProperties) DefaultAuthenticationContextValidator(org.apereo.cas.authentication.DefaultAuthenticationContextValidator) 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

DefaultAuthenticationContextValidator (org.apereo.cas.authentication.DefaultAuthenticationContextValidator)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