public class LoginServiceImpl extends Object implements LoginService
LOGIN_RESULT
Constructor and Description |
---|
LoginServiceImpl(LoginManager loginManager,
ApplicationProperties applicationProperties,
UserManager userManager,
JiraContactHelper contactHelper,
JiraAuthenticationContext authenticationContext) |
Modifier and Type | Method and Description |
---|---|
LoginResult |
authenticate(ApplicationUser user,
String password)
This can be called to see if a user knows the given password.
|
LoginInfo |
getLoginInfo(String userName)
This is called to get LoginInfo about a given user.
|
LoginProperties |
getLoginProperties(ApplicationUser remoteUser,
javax.servlet.http.HttpServletRequest request)
Returns loginProperties needed to render the login gadget or login form.
|
boolean |
isElevatedSecurityCheckAlwaysShown() |
void |
logout(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Log out of JIRA
|
void |
resetFailedLoginCount(ApplicationUser user)
This can be called to reset the failed login count of a user
|
LoginInfo |
updateLastLoginTime(ApplicationUser user)
This can be called to update the user's last login time upon a successful login.
|
public LoginServiceImpl(LoginManager loginManager, ApplicationProperties applicationProperties, UserManager userManager, JiraContactHelper contactHelper, JiraAuthenticationContext authenticationContext)
public LoginInfo getLoginInfo(String userName)
LoginService
getLoginInfo
in interface LoginService
userName
- the name of the user in play. This MUST not be null.LoginInfo
objectpublic boolean isElevatedSecurityCheckAlwaysShown()
isElevatedSecurityCheckAlwaysShown
in interface LoginService
public void resetFailedLoginCount(ApplicationUser user)
LoginService
resetFailedLoginCount
in interface LoginService
user
- the user to authorise. This MUST not be null.public LoginInfo updateLastLoginTime(ApplicationUser user)
LoginService
updateLastLoginTime
in interface LoginService
user
- the user who will have their last login time updatedpublic LoginResult authenticate(ApplicationUser user, String password)
LoginService
If the user requests elevatedSecurity then this will always fail with LoginReason.AUTHENTICATION_DENIED
authenticate
in interface LoginService
user
- the user to authenticate. This MUST not be null.password
- the password to authenticate againstpublic void logout(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
LoginService
logout
in interface LoginService
request
- the current servlet requestresponse
- the current servlet responsepublic LoginProperties getLoginProperties(ApplicationUser remoteUser, javax.servlet.http.HttpServletRequest request)
LoginService
getLoginProperties
in interface LoginService
remoteUser
- the currently logged in userrequest
- the incoming http request which may contain user credentialsCopyright © 2002-2017 Atlassian. All Rights Reserved.