Class JWTRequestHeaderAuthenticationFilter

  • 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 JWTRequestHeaderAuthenticationFilter
    extends org.springframework.security.web.authentication.preauth.RequestHeaderAuthenticationFilter
    Authentication filter for JWTs in request headers.
    • 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 Object getPreAuthenticatedPrincipal​(javax.servlet.http.HttpServletRequest request)  
      void setDebug​(boolean debug)
      Setter for the debug switch.
      void setLoginHandler​(JWTLoginHandler loginHandler)
      Setter for the login handler.
      void setPrincipalPrefix​(String principalPrefix)
      Setter for the principal prefix.
      • Methods inherited from class org.springframework.security.web.authentication.preauth.RequestHeaderAuthenticationFilter

        getPreAuthenticatedCredentials, setCredentialsRequestHeader, setExceptionIfHeaderMissing, setPrincipalRequestHeader
      • 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
    • Constructor Detail

      • JWTRequestHeaderAuthenticationFilter

        public JWTRequestHeaderAuthenticationFilter()
    • 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 Object getPreAuthenticatedPrincipal​(javax.servlet.http.HttpServletRequest request)
        Overrides:
        getPreAuthenticatedPrincipal in class org.springframework.security.web.authentication.preauth.RequestHeaderAuthenticationFilter
      • setPrincipalPrefix

        public void setPrincipalPrefix​(String principalPrefix)
        Setter for the principal prefix.
        Parameters:
        principalPrefix - The principal prefix.
      • setLoginHandler

        public void setLoginHandler​(JWTLoginHandler loginHandler)
        Setter for the login handler.
        Parameters:
        loginHandler - The login handler.
      • setDebug

        public void setDebug​(boolean debug)
        Setter for the debug switch.
        Parameters:
        debug - Value for the debug switch.