Class LoginServiceImpl

java.lang.Object
com.atlassian.jira.bc.security.login.LoginServiceImpl
All Implemented Interfaces:
LoginService

public class LoginServiceImpl extends Object implements LoginService
Implementation of LoginManager
Since:
v4.0.1
  • Constructor Details

  • Method Details

    • getLoginInfo

      public LoginInfo getLoginInfo(String userName)
      Description copied from interface: LoginService
      This is called to get LoginInfo about a given user.
      Specified by:
      getLoginInfo in interface LoginService
      Parameters:
      userName - the name of the user in play. This MUST not be null.
      Returns:
      a LoginInfo object
    • isElevatedSecurityCheckAlwaysShown

      public boolean isElevatedSecurityCheckAlwaysShown()
      Specified by:
      isElevatedSecurityCheckAlwaysShown in interface LoginService
      Returns:
      true if the elevated security check (such as CAPTCHA) is always shown
    • resetFailedLoginCount

      public void resetFailedLoginCount(ApplicationUser user)
      Description copied from interface: LoginService
      This can be called to reset the failed login count of a user
      Specified by:
      resetFailedLoginCount in interface LoginService
      Parameters:
      user - the user to authorise. This MUST not be null.
    • updateLastLoginTime

      public LoginInfo updateLastLoginTime(ApplicationUser user)
      Description copied from interface: LoginService
      This can be called to update the user's last login time upon a successful login.
      Specified by:
      updateLastLoginTime in interface LoginService
      Parameters:
      user - the user who will have their last login time updated
      Returns:
      an object containing the user's login history
    • authenticate

      public LoginResult authenticate(ApplicationUser user, String password)
      Description copied from interface: LoginService
      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

      Specified by:
      authenticate in interface LoginService
      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
    • logout

      public void logout(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response)
      Description copied from interface: LoginService
      Log out of JIRA
      Specified by:
      logout in interface LoginService
      Parameters:
      request - the current servlet request
      response - the current servlet response
    • getLoginProperties

      public LoginProperties getLoginProperties(ApplicationUser remoteUser, jakarta.servlet.http.HttpServletRequest request)
      Description copied from interface: LoginService
      Returns loginProperties needed to render the login gadget or login form.
      Specified by:
      getLoginProperties in interface LoginService
      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