Class RequestAttributePreAuthenticationProcessingFilter

  • 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.web.context.ServletContextAware

    public class RequestAttributePreAuthenticationProcessingFilter
    extends org.springframework.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter

    RequestAttributePreAuthenticationProcessingFilter class. This filter should be used PRE_AUTH_FILTER position in the filter chain.

    Author:
    Timothy Nowaczyk, tan7f@virginia.edu
    • Field Summary

      • Fields inherited from class org.springframework.web.filter.GenericFilterBean

        logger
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void afterPropertiesSet()  
      protected java.lang.Object getPreAuthenticatedCredentials​(javax.servlet.http.HttpServletRequest request)  
      protected java.lang.Object getPreAuthenticatedPrincipal​(javax.servlet.http.HttpServletRequest request)  
      void setCredentialsRequestHeader​(java.lang.String credentialsRequestAttribute)
      The attribute to extract the user's credentials from.
      void setEnabled​(boolean enabled)
      Whether or not to enable this pre-auth filter.
      void setFailOnError​(boolean failOnError)
      Whether to fail if the user is not found, or to fall through to other authentication mechanisms.
      void setPrincipalRequestHeader​(java.lang.String principleRequestAttribute)
      The attribute to extract the authenticated user from.
      • Methods inherited from class org.springframework.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter

        doFilter, getAuthenticationDetailsSource, setApplicationEventPublisher, setAuthenticationDetailsSource, setAuthenticationManager, setCheckForPrincipalChanges, setContinueFilterChainOnUnsuccessfulAuthentication, setInvalidateSessionOnPrincipalChange, successfulAuthentication, unsuccessfulAuthentication
      • Methods inherited from class org.springframework.web.filter.GenericFilterBean

        addRequiredProperty, destroy, getFilterConfig, getFilterName, getServletContext, init, initBeanWrapper, initFilterBean, setBeanName, setEnvironment, setServletContext
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RequestAttributePreAuthenticationProcessingFilter

        public RequestAttributePreAuthenticationProcessingFilter()
    • Method Detail

      • afterPropertiesSet

        public void afterPropertiesSet()
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Overrides:
        afterPropertiesSet in class org.springframework.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter
      • getPreAuthenticatedPrincipal

        protected java.lang.Object getPreAuthenticatedPrincipal​(javax.servlet.http.HttpServletRequest request)
        Specified by:
        getPreAuthenticatedPrincipal in class org.springframework.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter
      • getPreAuthenticatedCredentials

        protected java.lang.Object getPreAuthenticatedCredentials​(javax.servlet.http.HttpServletRequest request)
        Specified by:
        getPreAuthenticatedCredentials in class org.springframework.security.web.authentication.preauth.AbstractPreAuthenticatedProcessingFilter
      • setEnabled

        public void setEnabled​(boolean enabled)
        Whether or not to enable this pre-auth filter.
      • setPrincipalRequestHeader

        public void setPrincipalRequestHeader​(java.lang.String principleRequestAttribute)
        The attribute to extract the authenticated user from.
      • setCredentialsRequestHeader

        public void setCredentialsRequestHeader​(java.lang.String credentialsRequestAttribute)
        The attribute to extract the user's credentials from.
      • setFailOnError

        public void setFailOnError​(boolean failOnError)
        Whether to fail if the user is not found, or to fall through to other authentication mechanisms.