com.atlassian.jira.bc.security.login
Interface LoginService

All Known Implementing Classes:
LoginServiceImpl

public interface LoginService

The LoginService keeps track of users login activities.

Since:
v4.0.1

Field Summary
static java.lang.String LOGIN_RESULT
          This is set into the the request for the last login result
 
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
 

Field Detail

LOGIN_RESULT

static final java.lang.String LOGIN_RESULT
This is set into the the request for the last login result

See Also:
Constant Field Values
Method Detail

getLoginInfo

LoginInfo getLoginInfo(java.lang.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:
a LoginInfo object

isElevatedSecurityCheckAlwaysShown

boolean isElevatedSecurityCheckAlwaysShown()
Returns:
true if the elevated security check (such as CAPTCHA) is always shown

onLoginAttempt

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

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

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

authenticate

LoginResult authenticate(com.opensymphony.user.User user,
                         java.lang.String password)
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

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

void logout(javax.servlet.http.HttpServletRequest request,
            javax.servlet.http.HttpServletResponse response)
Log out of JIRA

Parameters:
request - the current servlet request
response - the current servlet response


Copyright © 2002-2011 Atlassian. All Rights Reserved.