com.atlassian.jira.security.JiraAuthenticationContext |
![]() |
Clients of @PublicApi
can expect
that programs compiled against a given version will remain binary compatible with later versions of the
@PublicApi
as per each product's API policy as long as the client does not implement/extend
@PublicApi
interfaces or classes (refer to each product's API policy for the exact
guarantee---usually binary compatibility is guaranteed at least across minor versions).
@PublicApi
interfaces and classes are not designed to be implemented or extended by clients,
we may perform certain types of binary-incompatible changes to these classes and interfaces, but these will not
affect well-behaved clients that do not extend/implement these types (in general, only classes and interfaces
annotated with @PublicSpi
are safe to extend/implement).
The JiraAuthenticationContext is used for tracking a user's session in JIRA and all it's custom parameters, such as Locale and I18n.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Clears any logged in user from authentication scope.
| |||||||||||
This method is deprecated.
Use
getI18nHelper() instead. Deprecated since v4.0
| |||||||||||
Useful for localisation of messages.
| |||||||||||
Get the users locale.
| |||||||||||
Returns the currently logged in User.
| |||||||||||
This method is deprecated.
Use
DateTimeFormatter instead. Since v5.0.
| |||||||||||
This method is deprecated.
Use getText() method on
getI18nHelper() .
| |||||||||||
This method is deprecated.
Use
getLoggedInUser() . Since v7.0
| |||||||||||
Returns a boolean indicating whether there is a currently logged in user.
| |||||||||||
This is used in places like Jelly where we need to switch the identity of a user during execution.
|
Clears any logged in user from authentication scope. After this call the anonymous user is considered to be about, ie no-one is about
This method is deprecated.
Use getI18nHelper()
instead. Deprecated since v4.0
Useful for localisation of messages.
I18nHelper
Useful for localisation of messages.
I18nHelper
Get the users locale.
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.
ApplicationUser
, or null
This method is deprecated.
Use DateTimeFormatter
instead. Since v5.0.
Method used to get a nice representation of a date using a user's locale.
This method is deprecated.
Use getText() method on getI18nHelper()
.
key | the text key |
---|
This method is deprecated.
Use getLoggedInUser()
. Since v7.0
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.
ApplicationUser
, or null
Returns a boolean indicating whether there is a currently logged in user.
This is used in places like Jelly where we need to switch the identity of a user during execution.
user | the currently logged in user |
---|