use of org.apereo.cas.authentication.bypass.RestMultifactorAuthenticationProviderBypassEvaluator in project cas by apereo.
the class GoogleAuthenticatorAuthenticationMultifactorProviderBypassConfiguration method googleAuthenticatorRestMultifactorAuthenticationProviderBypass.
@ConditionalOnMissingBean(name = "googleAuthenticatorRestMultifactorAuthenticationProviderBypass")
@Bean
@RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
public MultifactorAuthenticationProviderBypassEvaluator googleAuthenticatorRestMultifactorAuthenticationProviderBypass(final CasConfigurationProperties casProperties) {
val gauth = casProperties.getAuthn().getMfa().getGauth();
val props = gauth.getBypass();
return new RestMultifactorAuthenticationProviderBypassEvaluator(props, gauth.getId());
}
use of org.apereo.cas.authentication.bypass.RestMultifactorAuthenticationProviderBypassEvaluator in project cas by apereo.
the class U2FAuthenticationMultifactorProviderBypassConfiguration method u2fRestMultifactorAuthenticationProviderBypass.
@ConditionalOnMissingBean(name = "u2fRestMultifactorAuthenticationProviderBypass")
@Bean
@RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
public MultifactorAuthenticationProviderBypassEvaluator u2fRestMultifactorAuthenticationProviderBypass(final CasConfigurationProperties casProperties) {
val u2f = casProperties.getAuthn().getMfa().getU2f();
val props = u2f.getBypass();
return new RestMultifactorAuthenticationProviderBypassEvaluator(props, u2f.getId());
}
use of org.apereo.cas.authentication.bypass.RestMultifactorAuthenticationProviderBypassEvaluator in project cas by apereo.
the class YubiKeyAuthenticationMultifactorProviderBypassConfiguration method yubikeyRestMultifactorAuthenticationProviderBypass.
@ConditionalOnMissingBean(name = "yubikeyRestMultifactorAuthenticationProviderBypass")
@Bean
@RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
public MultifactorAuthenticationProviderBypassEvaluator yubikeyRestMultifactorAuthenticationProviderBypass(final CasConfigurationProperties casProperties) {
val yubikey = casProperties.getAuthn().getMfa().getYubikey();
val props = yubikey.getBypass();
return new RestMultifactorAuthenticationProviderBypassEvaluator(props, yubikey.getId());
}
use of org.apereo.cas.authentication.bypass.RestMultifactorAuthenticationProviderBypassEvaluator in project cas by apereo.
the class RestMultifactorAuthenticationProviderBypassEvaluatorTests method verifyOperationFailsWithNoProvider.
@Test
public void verifyOperationFailsWithNoProvider() {
try (val webServer = new MockWebServer(9316, new ByteArrayResource("Y".getBytes(StandardCharsets.UTF_8), "REST Output"), HttpStatus.ACCEPTED)) {
webServer.start();
val props = new MultifactorAuthenticationProviderBypassProperties();
props.getRest().setUrl("http://localhost:9316");
val provider = new TestMultifactorAuthenticationProvider();
val r = new RestMultifactorAuthenticationProviderBypassEvaluator(props, provider.getId());
val res = r.shouldMultifactorAuthenticationProviderExecute(MultifactorAuthenticationTestUtils.getAuthentication("casuser"), MultifactorAuthenticationTestUtils.getRegisteredService(), null, new MockHttpServletRequest());
assertTrue(res);
}
}
use of org.apereo.cas.authentication.bypass.RestMultifactorAuthenticationProviderBypassEvaluator in project cas by apereo.
the class InweboAuthenticationMultifactorProviderBypassConfiguration method inweboRestMultifactorAuthenticationProviderBypass.
@ConditionalOnMissingBean(name = "inweboRestMultifactorAuthenticationProviderBypass")
@Bean
@RefreshScope(proxyMode = ScopedProxyMode.DEFAULT)
public MultifactorAuthenticationProviderBypassEvaluator inweboRestMultifactorAuthenticationProviderBypass(final CasConfigurationProperties casProperties) {
val inwebo = casProperties.getAuthn().getMfa().getInwebo();
val props = inwebo.getBypass();
return new RestMultifactorAuthenticationProviderBypassEvaluator(props, inwebo.getId());
}
Aggregations