Class LoginServiceImpl
java.lang.Object
com.atlassian.jira.bc.security.login.LoginServiceImpl
- All Implemented Interfaces:
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
ConstructorsConstructorDescriptionLoginServiceImpl(LoginManager loginManager, ApplicationProperties applicationProperties, UserManager userManager, JiraContactHelper contactHelper, JiraAuthenticationContext authenticationContext) -
Method Summary
Modifier and TypeMethodDescriptionauthenticate(ApplicationUser user, String password) This can be called to see if a user knows the given password.getLoginInfo(String userName) This is called to get LoginInfo about a given user.getLoginProperties(ApplicationUser remoteUser, jakarta.servlet.http.HttpServletRequest request) Returns loginProperties needed to render the login gadget or login form.booleanvoidlogout(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Log out of JIRAvoidThis can be called to reset the failed login count of a userThis can be called to update the user's last login time upon a successful login.
-
Constructor Details
-
LoginServiceImpl
public LoginServiceImpl(LoginManager loginManager, ApplicationProperties applicationProperties, UserManager userManager, JiraContactHelper contactHelper, JiraAuthenticationContext authenticationContext)
-
-
Method Details
-
getLoginInfo
Description copied from interface:LoginServiceThis is called to get LoginInfo about a given user.- Specified by:
getLoginInfoin interfaceLoginService- Parameters:
userName- the name of the user in play. This MUST not be null.- Returns:
- a
LoginInfoobject
-
isElevatedSecurityCheckAlwaysShown
public boolean isElevatedSecurityCheckAlwaysShown()- Specified by:
isElevatedSecurityCheckAlwaysShownin interfaceLoginService- Returns:
- true if the elevated security check (such as CAPTCHA) is always shown
-
resetFailedLoginCount
Description copied from interface:LoginServiceThis can be called to reset the failed login count of a user- Specified by:
resetFailedLoginCountin interfaceLoginService- Parameters:
user- the user to authorise. This MUST not be null.
-
updateLastLoginTime
Description copied from interface:LoginServiceThis can be called to update the user's last login time upon a successful login.- Specified by:
updateLastLoginTimein interfaceLoginService- Parameters:
user- the user who will have their last login time updated- Returns:
- an object containing the user's login history
-
authenticate
Description copied from interface:LoginServiceThis 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:
authenticatein interfaceLoginService- 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:LoginServiceLog out of JIRA- Specified by:
logoutin interfaceLoginService- Parameters:
request- the current servlet requestresponse- the current servlet response
-
getLoginProperties
public LoginProperties getLoginProperties(ApplicationUser remoteUser, jakarta.servlet.http.HttpServletRequest request) Description copied from interface:LoginServiceReturns loginProperties needed to render the login gadget or login form.- Specified by:
getLoginPropertiesin interfaceLoginService- Parameters:
remoteUser- the currently logged in userrequest- the incoming http request which may contain user credentials- Returns:
- LoginProperties with information to render the login gadget/form
-