com.atlassian.confluence.util
Class UserThreadLocalFilter

java.lang.Object
  extended by com.atlassian.core.filters.AbstractHttpFilter
      extended by com.atlassian.confluence.util.UserThreadLocalFilter
All Implemented Interfaces:
javax.servlet.Filter

public class UserThreadLocalFilter
extends com.atlassian.core.filters.AbstractHttpFilter

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.


Field Summary
protected  com.atlassian.util.concurrent.Supplier<UserAccessor> userAccessor
           
 
Constructor Summary
UserThreadLocalFilter()
           
 
Method Summary
 void doFilter(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, javax.servlet.FilterChain filterChain)
           
protected  UserAccessor getUserAccessor()
           
 
Methods inherited from class com.atlassian.core.filters.AbstractHttpFilter
destroy, doFilter, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

userAccessor

protected com.atlassian.util.concurrent.Supplier<UserAccessor> userAccessor
Constructor Detail

UserThreadLocalFilter

public UserThreadLocalFilter()
Method Detail

doFilter

public void doFilter(javax.servlet.http.HttpServletRequest request,
                     javax.servlet.http.HttpServletResponse response,
                     javax.servlet.FilterChain filterChain)
              throws java.io.IOException,
                     javax.servlet.ServletException
Specified by:
doFilter in class com.atlassian.core.filters.AbstractHttpFilter
Throws:
java.io.IOException
javax.servlet.ServletException

getUserAccessor

protected UserAccessor getUserAccessor()


Copyright © 2003-2014 Atlassian. All Rights Reserved.