com.atlassian.confluence.user
Class AuthenticatedUserThreadLocal
java.lang.Object
com.atlassian.confluence.user.AuthenticatedUserThreadLocal
public class AuthenticatedUserThreadLocal
- extends java.lang.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).
Method Summary |
static com.atlassian.user.User |
getUser()
|
static java.lang.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 |
AuthenticatedUserThreadLocal
public AuthenticatedUserThreadLocal()
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 java.lang.String getUsername()
Copyright © 2003-2008 Atlassian Pty Ltd. All Rights Reserved.