Package org.ligoj.app.http.security
Class SilentRequestHeaderAuthenticationFilter
java.lang.Object
org.springframework.web.filter.GenericFilterBean
org.springframework.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter
org.springframework.security.web.authentication.preauth.RequestHeaderAuthenticationFilter
org.ligoj.app.http.security.SilentRequestHeaderAuthenticationFilter
- All Implemented Interfaces:
javax.servlet.Filter,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.InitializingBean,org.springframework.context.ApplicationEventPublisherAware,org.springframework.context.EnvironmentAware,org.springframework.core.env.EnvironmentCapable,org.springframework.web.context.ServletContextAware
public class SilentRequestHeaderAuthenticationFilter
extends org.springframework.security.web.authentication.preauth.RequestHeaderAuthenticationFilter
Security filter enabled when a required header is used for pre-authentication.
-
Field Summary
-
Constructor Summary
Constructors Constructor Description SilentRequestHeaderAuthenticationFilter()Simple constructor using a forward to "401" page on error. -
Method Summary
Modifier and Type Method Description voiddoFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)voidsetPrincipalRequestHeader(java.lang.String principalRequestHeader)Methods inherited from class org.springframework.security.web.authentication.preauth.RequestHeaderAuthenticationFilter
getPreAuthenticatedCredentials, getPreAuthenticatedPrincipal, setCredentialsRequestHeader, setExceptionIfHeaderMissingMethods inherited from class org.springframework.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter
afterPropertiesSet, getAuthenticationDetailsSource, principalChanged, setApplicationEventPublisher, setAuthenticationDetailsSource, setAuthenticationFailureHandler, setAuthenticationManager, setAuthenticationSuccessHandler, setCheckForPrincipalChanges, setContinueFilterChainOnUnsuccessfulAuthentication, setInvalidateSessionOnPrincipalChange, setRequiresAuthenticationRequestMatcher, successfulAuthentication, unsuccessfulAuthentication
-
Constructor Details
-
SilentRequestHeaderAuthenticationFilter
public SilentRequestHeaderAuthenticationFilter()Simple constructor using a forward to "401" page on error.
-
-
Method Details
-
setPrincipalRequestHeader
public void setPrincipalRequestHeader(java.lang.String principalRequestHeader)- Overrides:
setPrincipalRequestHeaderin classorg.springframework.security.web.authentication.preauth.RequestHeaderAuthenticationFilter
-
doFilter
public void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain) throws java.io.IOException, javax.servlet.ServletException- Specified by:
doFilterin interfacejavax.servlet.Filter- Overrides:
doFilterin classorg.springframework.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter- Throws:
java.io.IOExceptionjavax.servlet.ServletException
-