com.atlassian.jira.bc.security.login
Class LoginServiceImpl

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

public class LoginServiceImpl
extends java.lang.Object
implements LoginService

Implementation of LoginManager

Since:
v4.0.1

Field Summary
 
Fields inherited from interface com.atlassian.jira.bc.security.login.LoginService
LOGIN_RESULT
 
Constructor Summary
LoginServiceImpl(LoginManager loginManager)
           
 
Method Summary
 LoginResult authenticate(com.opensymphony.user.User user, java.lang.String password)
          This can be called to see if an user knows the given password.
 LoginInfo getLoginInfo(java.lang.String userName)
          This is called to get LoginInfo about a given user.
 boolean isElevatedSecurityCheckAlwaysShown()
           
 void logout(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Log out of JIRA
 LoginInfo onLoginAttempt(javax.servlet.http.HttpServletRequest httpServletRequest, java.lang.String userName, boolean loginSuccessful)
          This is called after a login attempt has been made.
 void resetFailedLoginCount(com.opensymphony.user.User user)
          This can be called to reset the failed login count of a user
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoginServiceImpl

public LoginServiceImpl(LoginManager loginManager)
Method Detail

getLoginInfo

public LoginInfo getLoginInfo(java.lang.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

onLoginAttempt

public LoginInfo onLoginAttempt(javax.servlet.http.HttpServletRequest httpServletRequest,
                                java.lang.String userName,
                                boolean loginSuccessful)
Description copied from interface: LoginService
This is called after a login attempt has been made. It allows the LoginManager to update information about a users login history.

Specified by:
onLoginAttempt in interface LoginService
Parameters:
httpServletRequest - the HTTP request in play
userName - the name of the user in play. This MUST not be null.
loginSuccessful - whether the login attempt was sucessful or not
Returns:
the updated LoginInfo about the user

resetFailedLoginCount

public void resetFailedLoginCount(com.opensymphony.user.User 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.

authenticate

public LoginResult authenticate(com.opensymphony.user.User user,
                                java.lang.String password)
Description copied from interface: LoginService
This can be called to see if an user knows the given password. Services such as SOAP and XML-RPC may use this to validate a request.

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(javax.servlet.http.HttpServletRequest request,
                   javax.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


Copyright © 2002-2010 Atlassian. All Rights Reserved.