public class

LoginServiceImpl

extends Object
implements LoginService
java.lang.Object
   ↳ com.atlassian.jira.bc.security.login.LoginServiceImpl

Class Overview

Implementation of LoginManager

Summary

[Expand]
Inherited Constants
From interface com.atlassian.jira.bc.security.login.LoginService
Public Constructors
LoginServiceImpl(LoginManager loginManager, ApplicationProperties applicationProperties, UserManager userManager, JiraContactHelper contactHelper, JiraAuthenticationContext authenticationContext)
Public Methods
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, HttpServletRequest request)
Returns loginProperties needed to render the login gadget or login form.
boolean isElevatedSecurityCheckAlwaysShown()
void logout(HttpServletRequest request, HttpServletResponse response)
Log out of JIRA
void resetFailedLoginCount(ApplicationUser user)
This can be called to reset the failed login count of a user
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.atlassian.jira.bc.security.login.LoginService

Public Constructors

public LoginServiceImpl (LoginManager loginManager, ApplicationProperties applicationProperties, UserManager userManager, JiraContactHelper contactHelper, JiraAuthenticationContext authenticationContext)

Public Methods

public LoginResult authenticate (ApplicationUser user, String password)

This can be called to see if a user knows the given password.

If the user requests elevatedSecurity then this will always fail with LoginReason.AUTHENTICATION_DENIED

Parameters
user the user to authenticate. This MUST not be null.
password the password to authenticate against
Returns
  • true if the user can be authenticated

public LoginInfo getLoginInfo (String userName)

This is called to get LoginInfo about a given user.

Parameters
userName the name of the user in play. This MUST not be null.
Returns

public LoginProperties getLoginProperties (ApplicationUser remoteUser, HttpServletRequest request)

Returns loginProperties needed to render the login gadget or login form.

Parameters
remoteUser the currently logged in user
request the incoming http request which may contain user credentials
Returns
  • LoginProperties with information to render the login gadget/form

public boolean isElevatedSecurityCheckAlwaysShown ()

public void logout (HttpServletRequest request, HttpServletResponse response)

Log out of JIRA

Parameters
request the current servlet request
response the current servlet response

public void resetFailedLoginCount (ApplicationUser user)

This can be called to reset the failed login count of a user

Parameters
user the user to authorise. This MUST not be null.