public class

JiraAuthenticationContextImpl

extends Object
implements JiraAuthenticationContext
java.lang.Object
   ↳ com.atlassian.jira.security.JiraAuthenticationContextImpl

Summary

Public Constructors
JiraAuthenticationContextImpl(AuthenticationContext authenticationContext, I18nHelper.BeanFactory i18n)
Public Methods
void clearLoggedInUser()
Clears any logged in user from authentication scope.
static void clearRequestCache()
I18nHelper getI18nBean()
Useful for localisation of messages.
I18nHelper getI18nHelper()
Useful for localisation of messages.
Locale getLocale()
Get the users locale.
User getLoggedInUser()
Returns the currently logged in User.
OutlookDate getOutlookDate()
Method used to get a nice representation of a date using a user's locale.
static Map<StringObject> getRequestCache()
String getText(String key)
ApplicationUser getUser()
Returns the currently logged in User.
boolean isLoggedInUser()
Returns a boolean indicating whether there is a currently logged in user.
void setLoggedInUser(ApplicationUser user)
This is used in places like Jelly where we need to switch the identity of a user during execution.
@Deprecated void setLoggedInUser(User user)
This id usedin places like Jelly where we need to switch the identity of a user during execution.
Protected Methods
UserManager getUserManager()
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.security.JiraAuthenticationContext

Public Constructors

public JiraAuthenticationContextImpl (AuthenticationContext authenticationContext, I18nHelper.BeanFactory i18n)

Public Methods

public void clearLoggedInUser ()

Clears any logged in user from authentication scope. After this call the anonymous user is considered to be about, ie no-one is about

public static void clearRequestCache ()

public I18nHelper getI18nBean ()

Useful for localisation of messages.

Returns

public I18nHelper getI18nHelper ()

Useful for localisation of messages.

Returns

public Locale getLocale ()

Get the users locale.

Returns
  • The user's locale, or the default system locale.

public User getLoggedInUser ()

Returns the currently logged in User.

Returns
  • The logged in User, or null

public OutlookDate getOutlookDate ()

Method used to get a nice representation of a date using a user's locale.

Returns

public static Map<StringObject> getRequestCache ()

public String getText (String key)

public ApplicationUser getUser ()

Returns the currently logged in User.

Warning: previous incarnations of this method returned com.atlassian.crowd.embedded.api.User. This method had previously been deprecated and has been reused to return an ApplicationUser instead. That class has different semantics for equals(Object) and therefore does not extend the User class. This means that the 6.0 version is not binary or source compatible with earlier versions when this method is used.

Returns
  • The logged in ApplicationUser, or null

public boolean isLoggedInUser ()

Returns a boolean indicating whether there is a currently logged in user.

Returns
  • true if there is a currently logged in user

public void setLoggedInUser (ApplicationUser user)

This is used in places like Jelly where we need to switch the identity of a user during execution.

Parameters
user the currently logged in user

@Deprecated public void setLoggedInUser (User user)

This id usedin places like Jelly where we need to switch the identity of a user during execution.

Parameters
user the currently logged in user

Protected Methods

protected UserManager getUserManager ()