use of com.evolveum.midpoint.authentication.impl.handler.MidPointAuthenticationSuccessHandler in project midpoint by Evolveum.
the class SecurityQuestionsFormModuleWebSecurityConfigurer method configure.
@Override
protected void configure(HttpSecurity http) throws Exception {
super.configure(http);
http.antMatcher(AuthUtil.stripEndingSlashes(getPrefix()) + "/**");
getOrApply(http, new MidpointFormLoginConfigurer<>(new SecurityQuestionsAuthenticationFilter())).loginPage("/securityquestions").loginProcessingUrl(AuthUtil.stripEndingSlashes(getPrefix()) + "/spring_security_login").failureHandler(new MidpointAuthenticationFailureHandler()).successHandler(getObjectPostProcessor().postProcess(new MidPointAuthenticationSuccessHandler())).permitAll();
getOrApply(http, new MidpointExceptionHandlingConfigurer<>()).authenticationEntryPoint(new WicketLoginUrlAuthenticationEntryPoint("/securityquestions"));
http.logout().clearAuthentication(true).logoutRequestMatcher(getLogoutMatcher(http, getPrefix() + "/logout")).invalidateHttpSession(true).deleteCookies("JSESSIONID").logoutSuccessHandler(createLogoutHandler());
}
use of com.evolveum.midpoint.authentication.impl.handler.MidPointAuthenticationSuccessHandler in project midpoint by Evolveum.
the class MidpointWebSecurityConfigurerAdapter method authenticationSuccessHandler.
@Bean
public MidPointAuthenticationSuccessHandler authenticationSuccessHandler() {
MidPointAuthenticationSuccessHandler handler = new MidPointAuthenticationSuccessHandler();
handler.setUseReferer(true);
handler.setDefaultTargetUrl("/login");
return handler;
}
Aggregations