com.atlassian.confluence.user
Class AuthenticatedUserThreadLocal

java.lang.Object
  extended by com.atlassian.confluence.user.AuthenticatedUserThreadLocal

public class AuthenticatedUserThreadLocal
extends Object

A simple ThreadLocal to store the currently authenticated user. This can be used when the user comes from something other than the web interface (i.e. SOAP).


Constructor Summary
AuthenticatedUserThreadLocal()
           
 
Method Summary
static com.atlassian.user.User getUser()
           
static String getUsername()
           
static void reset()
          Remove any user from the current context
static void setUser(com.atlassian.user.User user)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthenticatedUserThreadLocal

public AuthenticatedUserThreadLocal()
Method Detail

setUser

public static void setUser(com.atlassian.user.User user)

getUser

public static com.atlassian.user.User getUser()
Returns:
the currently authenticated user, null if anonymous user

reset

public static void reset()
Remove any user from the current context


getUsername

public static String getUsername()


Copyright © 2003-2013 Atlassian. All Rights Reserved.