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 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, ApplicationProperties applicationProperties, UserManager userManager, JiraContactHelper contactHelper, JiraAuthenticationContext authenticationContext)
           
 
Method Summary
 LoginResult authenticate(com.atlassian.crowd.embedded.api.User user, String password)
          This can be called to see if an user knows the given password.
 LoginInfo getLoginInfo(String userName)
          This is called to get LoginInfo about a given user.
 LoginProperties getLoginProperties(com.atlassian.crowd.embedded.api.User 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(com.atlassian.crowd.embedded.api.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,
                        ApplicationProperties applicationProperties,
                        UserManager userManager,
                        JiraContactHelper contactHelper,
                        JiraAuthenticationContext authenticationContext)
Method Detail

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(com.atlassian.crowd.embedded.api.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.atlassian.crowd.embedded.api.User user,
                                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

getLoginProperties

public LoginProperties getLoginProperties(com.atlassian.crowd.embedded.api.User remoteUser,
                                          javax.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


Copyright © 2002-2012 Atlassian. All Rights Reserved.