use of com.evolveum.midpoint.authentication.impl.oidc.OidcLoginConfigurer in project midpoint by Evolveum.
the class OidcClientModuleWebSecurityConfigurer method configure.
@Override
protected void configure(HttpSecurity http) throws Exception {
super.configure(http);
OidcLoginConfigurer configurer = new OidcLoginConfigurer(auditProvider);
configurer.midpointFailureHandler(new MidpointAuthenticationFailureHandler()).clientRegistrationRepository(clientRegistrationRepository()).loginProcessingUrl(AuthUtil.stripEndingSlashes(getPrefix()) + RemoteModuleAuthenticationImpl.AUTHENTICATION_REQUEST_PROCESSING_URL_SUFFIX_WITH_REG_ID).authorizationRequestBaseUri(AuthUtil.stripEndingSlashes(getPrefix()) + RemoteModuleAuthenticationImpl.AUTHORIZATION_REQUEST_PROCESSING_URL_SUFFIX).successHandler(getObjectPostProcessor().postProcess(new MidPointAuthenticationSuccessHandler()));
try {
configurer.authenticationManager(new ProviderManager(Collections.emptyList(), authenticationManager()));
} catch (Exception e) {
LOGGER.error("Couldn't initialize authentication manager for oidc module");
}
getOrApply(http, configurer);
}
Aggregations