Search in sources :

Example 1 with AcegiSecurityExceptionFilter

use of jenkins.security.AcegiSecurityExceptionFilter in project jenkins by jenkinsci.

the class SecurityRealm method commonFilters.

protected final List<Filter> commonFilters() {
    // like Jenkins.ANONYMOUS:
    AnonymousAuthenticationFilter apf = new AnonymousAuthenticationFilter("anonymous", "anonymous", Collections.singletonList(new SimpleGrantedAuthority("anonymous")));
    ExceptionTranslationFilter etf = new ExceptionTranslationFilter(new HudsonAuthenticationEntryPoint("/" + getLoginUrl() + "?from={0}"));
    etf.setAccessDeniedHandler(new AccessDeniedHandlerImpl());
    UnwrapSecurityExceptionFilter usef = new UnwrapSecurityExceptionFilter();
    AcegiSecurityExceptionFilter asef = new AcegiSecurityExceptionFilter();
    return Arrays.asList(apf, etf, usef, asef);
}
Also used : AcegiSecurityExceptionFilter(jenkins.security.AcegiSecurityExceptionFilter) SimpleGrantedAuthority(org.springframework.security.core.authority.SimpleGrantedAuthority) AnonymousAuthenticationFilter(org.springframework.security.web.authentication.AnonymousAuthenticationFilter) ExceptionTranslationFilter(org.springframework.security.web.access.ExceptionTranslationFilter)

Aggregations

AcegiSecurityExceptionFilter (jenkins.security.AcegiSecurityExceptionFilter)1 SimpleGrantedAuthority (org.springframework.security.core.authority.SimpleGrantedAuthority)1 ExceptionTranslationFilter (org.springframework.security.web.access.ExceptionTranslationFilter)1 AnonymousAuthenticationFilter (org.springframework.security.web.authentication.AnonymousAuthenticationFilter)1