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
Fields Modifier and Type Field Description static java.lang.StringWHITE_LIST_PATTERNCommon whitelist pattern.Fields inherited from class org.springframework.web.filter.GenericFilterBean
logger -
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, unsuccessfulAuthenticationMethods inherited from class org.springframework.web.filter.GenericFilterBean
addRequiredProperty, createEnvironment, destroy, getEnvironment, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContextMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
WHITE_LIST_PATTERN
public static final java.lang.String WHITE_LIST_PATTERNCommon whitelist pattern.- See Also:
- Constant Field Values
-
-
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
-