Search in sources :

Example 1 with ShibbolethRequestHeaderAuthenticationFilter

use of de.tudarmstadt.ukp.clarin.webanno.security.preauth.ShibbolethRequestHeaderAuthenticationFilter in project webanno by webanno.

the class WebAnnoSecurity method preAuthFilter.

@Bean
@Profile("auto-mode-preauth")
public ShibbolethRequestHeaderAuthenticationFilter preAuthFilter(UserDao aUserRepository, UserDetailsManager aUserDetailsService, @Lazy AuthenticationManager aAuthenticationManager) {
    ShibbolethRequestHeaderAuthenticationFilter filter = new ShibbolethRequestHeaderAuthenticationFilter();
    filter.setPrincipalRequestHeader(preAuthPrincipalHeader);
    filter.setAuthenticationManager(aAuthenticationManager);
    filter.setUserDetailsManager(aUserDetailsService);
    filter.setUserRepository(aUserRepository);
    filter.setExceptionIfHeaderMissing(true);
    return filter;
}
Also used : ShibbolethRequestHeaderAuthenticationFilter(de.tudarmstadt.ukp.clarin.webanno.security.preauth.ShibbolethRequestHeaderAuthenticationFilter) Profile(org.springframework.context.annotation.Profile) Bean(org.springframework.context.annotation.Bean)

Aggregations

ShibbolethRequestHeaderAuthenticationFilter (de.tudarmstadt.ukp.clarin.webanno.security.preauth.ShibbolethRequestHeaderAuthenticationFilter)1 Bean (org.springframework.context.annotation.Bean)1 Profile (org.springframework.context.annotation.Profile)1