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 I18nBeangetI18NBean()Get i18n bean associated with the current user.LocalegetLocale()Get locale associated with the current user.@Nullable com.atlassian.user.UsergetUser()Who's the current current user (in the current http session!)@Nullable StringgetUserName()Who's the current current user (in the current http session!)@Nullable StringgetUserNameFromSecurityContext()
-
-
-
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:BambooAuthenticationContextWho's the current current user (in the current http session!)- Specified by:
getUserin interfaceBambooAuthenticationContext- Returns:
- The user. Null if they are not logged in.
-
getUserName
@Nullable public @Nullable String getUserName()
Description copied from interface:BambooAuthenticationContextWho's the current current user (in the current http session!)- Specified by:
getUserNamein interfaceBambooAuthenticationContext- Returns:
- the user name if the current user, null if no one.
-
getUserNameFromSecurityContext
@Nullable public @Nullable String getUserNameFromSecurityContext()
- Specified by:
getUserNameFromSecurityContextin interfaceBambooAuthenticationContext- Returns:
- the username of the current user, or null
-
getLocale
public Locale getLocale()
Description copied from interface:BambooAuthenticationContextGet locale associated with the current user.- Specified by:
getLocalein interfaceBambooAuthenticationContext- Returns:
- locale of the user
-
getI18NBean
public I18nBean getI18NBean()
Description copied from interface:BambooAuthenticationContextGet i18n bean associated with the current user.- Specified by:
getI18NBeanin interfaceBambooAuthenticationContext- Returns:
- i18n associated with the user
-
-