@PublicApi
public interface JiraAuthenticationContext
Modifier and Type | Method and Description |
---|---|
void |
clearLoggedInUser()
Clears any logged in user from authentication scope.
|
I18nHelper |
getI18nBean()
Deprecated.
Use
getI18nHelper() instead. Deprecated since v4.0 |
I18nHelper |
getI18nHelper()
Useful for localisation of messages.
|
Locale |
getLocale()
Get the users locale.
|
ApplicationUser |
getLoggedInUser()
Returns the currently logged in User.
|
OutlookDate |
getOutlookDate()
Deprecated.
Use
DateTimeFormatter instead. Since v5.0. |
String |
getText(String key)
Deprecated.
Use getText() method on
getI18nHelper() . |
ApplicationUser |
getUser()
Deprecated.
Use
getLoggedInUser() . Since v7.0 |
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 @IncompatibleReturnType(since="6.0", was="com.atlassian.crowd.embedded.api.User") ApplicationUser getUser()
getLoggedInUser()
. Since v7.0
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 Object.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
@IncompatibleReturnType(since="7.0", was="com.atlassian.crowd.embedded.api.User") ApplicationUser getLoggedInUser()
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 Object.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
boolean isLoggedInUser()
Locale getLocale()
@Deprecated OutlookDate getOutlookDate()
DateTimeFormatter
instead. Since v5.0.OutlookDate
@Deprecated String getText(String key)
getI18nHelper()
.key
- the text key@Nonnull I18nHelper getI18nHelper()
I18nHelper
@Deprecated I18nHelper getI18nBean()
getI18nHelper()
instead. Deprecated since v4.0I18nHelper
void setLoggedInUser(ApplicationUser user)
user
- the currently logged in uservoid clearLoggedInUser()
Copyright © 2002-2019 Atlassian. All Rights Reserved.