Package com.atlassian.bamboo.user
Class DefaultAuthenticationContext
- java.lang.Object
-
- com.atlassian.bamboo.user.DefaultAuthenticationContext
-
- All Implemented Interfaces:
BambooAuthenticationContext
public class DefaultAuthenticationContext extends Object implements BambooAuthenticationContext
-
-
Constructor Summary
Constructors Constructor Description DefaultAuthenticationContext(BambooUserManager bambooUserManager, I18nBeanFactory i18nBeanFactory)
Deprecated.since 6.6 use autowiring instead.DefaultAuthenticationContext(I18nBeanFactory i18nBeanFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description I18nBean
getI18NBean()
Get i18n bean associated with the current user.Locale
getLocale()
Get locale associated with the current user.@Nullable com.atlassian.user.User
getUser()
Who's the current current user (in the current http session!)@Nullable String
getUserName()
Who's the current current user (in the current http session!)@Nullable String
getUserNameFromSecurityContext()
-
-
-
Constructor Detail
-
DefaultAuthenticationContext
public DefaultAuthenticationContext(I18nBeanFactory i18nBeanFactory)
-
DefaultAuthenticationContext
@Deprecated public DefaultAuthenticationContext(BambooUserManager bambooUserManager, I18nBeanFactory i18nBeanFactory)
Deprecated.since 6.6 use autowiring instead.
-
-
Method Detail
-
getUser
@Nullable public @Nullable com.atlassian.user.User getUser()
Description copied from interface:BambooAuthenticationContext
Who's the current current user (in the current http session!)- Specified by:
getUser
in interfaceBambooAuthenticationContext
- Returns:
- The user. Null if they are not logged in.
-
getUserName
@Nullable public @Nullable String getUserName()
Description copied from interface:BambooAuthenticationContext
Who's the current current user (in the current http session!)- Specified by:
getUserName
in interfaceBambooAuthenticationContext
- Returns:
- the user name if the current user, null if no one.
-
getUserNameFromSecurityContext
@Nullable public @Nullable String getUserNameFromSecurityContext()
- Specified by:
getUserNameFromSecurityContext
in interfaceBambooAuthenticationContext
- Returns:
- the username of the current user, or null
-
getLocale
public Locale getLocale()
Description copied from interface:BambooAuthenticationContext
Get locale associated with the current user.- Specified by:
getLocale
in interfaceBambooAuthenticationContext
- Returns:
- locale of the user
-
getI18NBean
public I18nBean getI18NBean()
Description copied from interface:BambooAuthenticationContext
Get i18n bean associated with the current user.- Specified by:
getI18NBean
in interfaceBambooAuthenticationContext
- Returns:
- i18n associated with the user
-
-