Class LoginResultImpl
java.lang.Object
com.atlassian.jira.bc.security.login.LoginResultImpl
- All Implemented Interfaces:
LoginResult
Simple Implementation of
LoginResult
- Since:
- v4.0.1
-
Constructor Summary
ConstructorsConstructorDescriptionLoginResultImpl
(LoginReason reason, LoginInfo loginInfo, String userName) LoginResultImpl
(LoginReason reason, LoginInfo loginInfo, String userName, Set<DeniedReason> deniedReasons) -
Method Summary
-
Constructor Details
-
LoginResultImpl
-
LoginResultImpl
public LoginResultImpl(LoginReason reason, LoginInfo loginInfo, String userName, Set<DeniedReason> deniedReasons)
-
-
Method Details
-
isOK
public boolean isOK()- Specified by:
isOK
in interfaceLoginResult
- Returns:
- true if all is OK. In this case
LoginResult.getReason()
will equalsLoginReason.OK
-
getUserName
- Specified by:
getUserName
in interfaceLoginResult
- Returns:
- the name of the user that the login was performed for or null if its not known
-
getReason
Description copied from interface:LoginResult
If the login fails then this enum describes why- Specified by:
getReason
in interfaceLoginResult
- Returns:
- the
LoginReason
-
getLoginInfo
- Specified by:
getLoginInfo
in interfaceLoginResult
- Returns:
- The
LoginInfo
associated with the user or null if theLoginResult.getUserName()
returns null.
-
getDeniedReasons
Description copied from interface:LoginResult
Returns a Set of DenialReason objects, which can be used to determine the reason why a login request has been denied. This method returns an empty set when
.LoginResult.getReason()
!=LoginReason.AUTHENTICATION_DENIED
- Specified by:
getDeniedReasons
in interfaceLoginResult
- Returns:
- a Set of DenialReason
-
toString
-