use of org.apereo.cas.authentication.bypass.PrincipalMultifactorAuthenticationProviderBypassEvaluator in project cas by apereo.
the class RadiusTokenAuthenticationMultifactorProviderBypassConfiguration method radiusPrincipalMultifactorAuthenticationProviderBypass.
@Bean
@RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
@ConditionalOnMissingBean(name = "radiusPrincipalMultifactorAuthenticationProviderBypass")
public MultifactorAuthenticationProviderBypassEvaluator radiusPrincipalMultifactorAuthenticationProviderBypass(final CasConfigurationProperties casProperties) {
val radius = casProperties.getAuthn().getMfa().getRadius();
val props = radius.getBypass();
return new PrincipalMultifactorAuthenticationProviderBypassEvaluator(props, radius.getId());
}
use of org.apereo.cas.authentication.bypass.PrincipalMultifactorAuthenticationProviderBypassEvaluator in project cas by apereo.
the class MultifactorAuthenticationProviderBypassTests method verifyMultifactorAuthenticationBypassByPrincipalAttributes.
@Test
public void verifyMultifactorAuthenticationBypassByPrincipalAttributes() {
val applicationContext = new StaticApplicationContext();
applicationContext.refresh();
ApplicationContextProvider.holdApplicationContext(applicationContext);
ApplicationContextProvider.registerBeanIntoApplicationContext(applicationContext, MultifactorAuthenticationPrincipalResolver.identical(), UUID.randomUUID().toString());
val request = new MockHttpServletRequest();
val props = new MultifactorAuthenticationProviderBypassProperties();
props.setPrincipalAttributeName("givenName");
props.setPrincipalAttributeValue("CAS");
val principal = MultifactorAuthenticationTestUtils.getPrincipal("casuser", CollectionUtils.wrap("givenName", "CAS"));
val authentication = MultifactorAuthenticationTestUtils.getAuthentication(principal, CollectionUtils.wrap("authnFlag", "bypass"));
val provider = TestMultifactorAuthenticationProvider.registerProviderIntoApplicationContext(applicationContext);
val bypass = new PrincipalMultifactorAuthenticationProviderBypassEvaluator(props, provider.getId());
val service = MultifactorAuthenticationTestUtils.getRegisteredService();
assertFalse(bypass.shouldMultifactorAuthenticationProviderExecute(authentication, service, provider, request));
}
use of org.apereo.cas.authentication.bypass.PrincipalMultifactorAuthenticationProviderBypassEvaluator in project cas by apereo.
the class AuthyAuthenticationMultifactorProviderBypassConfiguration method authyPrincipalMultifactorAuthenticationProviderBypass.
@Bean
@RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
@ConditionalOnMissingBean(name = "authyPrincipalMultifactorAuthenticationProviderBypass")
public MultifactorAuthenticationProviderBypassEvaluator authyPrincipalMultifactorAuthenticationProviderBypass(final CasConfigurationProperties casProperties) {
val authy = casProperties.getAuthn().getMfa().getAuthy();
val props = authy.getBypass();
return new PrincipalMultifactorAuthenticationProviderBypassEvaluator(props, authy.getId());
}
use of org.apereo.cas.authentication.bypass.PrincipalMultifactorAuthenticationProviderBypassEvaluator in project cas by apereo.
the class WebAuthnMultifactorProviderBypassConfiguration method webAuthnPrincipalMultifactorAuthenticationProviderBypass.
@Bean
@RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
@ConditionalOnMissingBean(name = "webAuthnPrincipalMultifactorAuthenticationProviderBypass")
public MultifactorAuthenticationProviderBypassEvaluator webAuthnPrincipalMultifactorAuthenticationProviderBypass(final CasConfigurationProperties casProperties) {
val webAuthn = casProperties.getAuthn().getMfa().getWebAuthn();
val props = webAuthn.getBypass();
return new PrincipalMultifactorAuthenticationProviderBypassEvaluator(props, webAuthn.getId());
}
use of org.apereo.cas.authentication.bypass.PrincipalMultifactorAuthenticationProviderBypassEvaluator in project cas by apereo.
the class InweboAuthenticationMultifactorProviderBypassConfiguration method inweboPrincipalMultifactorAuthenticationProviderBypass.
@Bean
@RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
@ConditionalOnMissingBean(name = "inweboPrincipalMultifactorAuthenticationProviderBypass")
public MultifactorAuthenticationProviderBypassEvaluator inweboPrincipalMultifactorAuthenticationProviderBypass(final CasConfigurationProperties casProperties) {
val inwebo = casProperties.getAuthn().getMfa().getInwebo();
val props = inwebo.getBypass();
return new PrincipalMultifactorAuthenticationProviderBypassEvaluator(props, inwebo.getId());
}
Aggregations