use of com.evolveum.midpoint.authentication.impl.filter.MidpointExceptionTranslationFilter in project midpoint by Evolveum.
the class MidpointExceptionHandlingConfigurer method configure.
@Override
public void configure(H http) throws Exception {
AuthenticationEntryPoint entryPoint = getAuthenticationEntryPoint();
ExceptionTranslationFilter exceptionTranslationFilter = new MidpointExceptionTranslationFilter(entryPoint, getRequestCache(http)) {
@Override
protected Authentication createNewAuthentication(AnonymousAuthenticationToken authentication) {
return MidpointExceptionHandlingConfigurer.this.createNewAuthentication(authentication);
}
};
AccessDeniedHandler deniedHandler = getAccessDeniedHandler();
exceptionTranslationFilter.setAccessDeniedHandler(deniedHandler);
exceptionTranslationFilter.setAuthenticationTrustResolver(getAuthenticationTrustResolver());
exceptionTranslationFilter = postProcess(exceptionTranslationFilter);
http.addFilterAfter(exceptionTranslationFilter, MidpointAnonymousAuthenticationFilter.class);
}
Aggregations