Class UserThreadLocalFilter

java.lang.Object
jakarta.servlet.GenericFilter
jakarta.servlet.http.HttpFilter
com.atlassian.confluence.util.UserThreadLocalFilter
All Implemented Interfaces:
jakarta.servlet.Filter, jakarta.servlet.FilterConfig, Serializable

public class UserThreadLocalFilter extends jakarta.servlet.http.HttpFilter
Makes sure the current user is always in the AuthenticatedUserThreadLocal at the beginning of a request, and is cleared at the end.

Obviously, this filter can only be run after Seraph gets its grubby little paws on the request.

See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    doFilter(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.FilterChain filterChain)
     
    protected UserAccessor
     

    Methods inherited from class jakarta.servlet.http.HttpFilter

    doFilter

    Methods inherited from class jakarta.servlet.GenericFilter

    getFilterConfig, getFilterName, getInitParameter, getInitParameterNames, getServletContext, init, init

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface jakarta.servlet.Filter

    destroy
  • Field Details

  • Constructor Details

    • UserThreadLocalFilter

      public UserThreadLocalFilter()
  • Method Details

    • doFilter

      public void doFilter(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, jakarta.servlet.FilterChain filterChain) throws IOException, jakarta.servlet.ServletException
      Overrides:
      doFilter in class jakarta.servlet.http.HttpFilter
      Throws:
      IOException
      jakarta.servlet.ServletException
    • getUserAccessor

      protected UserAccessor getUserAccessor()