public class

AuthenticatedUserThreadLocal

extends Object
java.lang.Object
   ↳ com.atlassian.confluence.user.AuthenticatedUserThreadLocal

Class Overview

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).

Summary

Public Constructors
AuthenticatedUserThreadLocal()
Public Methods
static User getUser()
static String getUsername()
static void reset()
Remove any user from the current context
static void setUser(User user)
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public AuthenticatedUserThreadLocal ()

Public Methods

public static User getUser ()

Returns
  • the currently authenticated user, null if anonymous user

public static String getUsername ()

public static void reset ()

Remove any user from the current context

public static void setUser (User user)