Class JwtAuthFilter

java.lang.Object
io.telicent.servlet.auth.jwt.AbstractJwtAuthFilter<TRequest,TResponse>
io.telicent.servlet.auth.jwt.AbstractConfigurableJwtAuthFilter<jakarta.servlet.http.HttpServletRequest,jakarta.servlet.http.HttpServletResponse>
io.telicent.servlet.auth.jwt.servlet5.JwtAuthFilter
All Implemented Interfaces:
jakarta.servlet.Filter

public class JwtAuthFilter extends io.telicent.servlet.auth.jwt.AbstractConfigurableJwtAuthFilter<jakarta.servlet.http.HttpServletRequest,jakarta.servlet.http.HttpServletResponse> implements jakarta.servlet.Filter
A filter that requires that users provide a valid JSON Web Token (JWT) in order for their requests to proceed
  • Field Summary

    Fields inherited from class io.telicent.servlet.auth.jwt.AbstractConfigurableJwtAuthFilter

    config, lastAuthenticatedRequest

    Fields inherited from class io.telicent.servlet.auth.jwt.AbstractJwtAuthFilter

    EXCLUSION_WARNINGS_CACHE, EXCLUSIONS_CACHE_SIZE
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    void
    doFilter(jakarta.servlet.ServletRequest servletRequest, jakarta.servlet.ServletResponse servletResponse, jakarta.servlet.FilterChain filterChain)
     
    protected Object
    getAttribute(jakarta.servlet.http.HttpServletRequest httpServletRequest, String attribute)
     
    protected io.telicent.servlet.auth.jwt.JwtAuthenticationEngine<jakarta.servlet.http.HttpServletRequest,jakarta.servlet.http.HttpServletResponse>
     
    protected String
    getPath(jakarta.servlet.http.HttpServletRequest httpServletRequest)
     
    protected int
    getStatus(jakarta.servlet.http.HttpServletResponse httpServletResponse)
     
    void
    init(jakarta.servlet.FilterConfig filterConfig)
     

    Methods inherited from class io.telicent.servlet.auth.jwt.AbstractConfigurableJwtAuthFilter

    configure, doFilter

    Methods inherited from class io.telicent.servlet.auth.jwt.AbstractJwtAuthFilter

    isExcludedPath

    Methods inherited from class java.lang.Object

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

    • JwtAuthFilter

      public JwtAuthFilter()
  • Method Details

    • init

      public void init(jakarta.servlet.FilterConfig filterConfig)
      Specified by:
      init in interface jakarta.servlet.Filter
    • getAttribute

      protected Object getAttribute(jakarta.servlet.http.HttpServletRequest httpServletRequest, String attribute)
      Specified by:
      getAttribute in class io.telicent.servlet.auth.jwt.AbstractConfigurableJwtAuthFilter<jakarta.servlet.http.HttpServletRequest,jakarta.servlet.http.HttpServletResponse>
    • getPath

      protected String getPath(jakarta.servlet.http.HttpServletRequest httpServletRequest)
      Specified by:
      getPath in class io.telicent.servlet.auth.jwt.AbstractConfigurableJwtAuthFilter<jakarta.servlet.http.HttpServletRequest,jakarta.servlet.http.HttpServletResponse>
    • getDefaultEngine

      protected io.telicent.servlet.auth.jwt.JwtAuthenticationEngine<jakarta.servlet.http.HttpServletRequest,jakarta.servlet.http.HttpServletResponse> getDefaultEngine()
      Specified by:
      getDefaultEngine in class io.telicent.servlet.auth.jwt.AbstractConfigurableJwtAuthFilter<jakarta.servlet.http.HttpServletRequest,jakarta.servlet.http.HttpServletResponse>
    • getStatus

      protected int getStatus(jakarta.servlet.http.HttpServletResponse httpServletResponse)
      Specified by:
      getStatus in class io.telicent.servlet.auth.jwt.AbstractConfigurableJwtAuthFilter<jakarta.servlet.http.HttpServletRequest,jakarta.servlet.http.HttpServletResponse>
    • doFilter

      public void doFilter(jakarta.servlet.ServletRequest servletRequest, jakarta.servlet.ServletResponse servletResponse, jakarta.servlet.FilterChain filterChain) throws IOException, jakarta.servlet.ServletException
      Specified by:
      doFilter in interface jakarta.servlet.Filter
      Throws:
      IOException
      jakarta.servlet.ServletException
    • destroy

      public void destroy()
      Specified by:
      destroy in interface jakarta.servlet.Filter