Class BambooCaptchaValidationServiceImpl
java.lang.Object
com.atlassian.bamboo.user.authentication.BambooCaptchaValidationServiceImpl
- All Implemented Interfaces:
BambooCaptchaValidationService
public class BambooCaptchaValidationServiceImpl
extends Object
implements BambooCaptchaValidationService
-
Constructor Summary
ConstructorDescriptionBambooCaptchaValidationServiceImpl
(LoginInformationManager loginInformationManager) -
Method Summary
Modifier and TypeMethodDescriptionboolean
isRequired
(String username) Returns whether a CAPTCHA challenge is required.void
onFailedLoginAttempt
(javax.servlet.http.HttpServletRequest httpServletRequest, String userName) This is called when a user fails a login check, either because they failed the elevated security check or they failed the more basic username and password check.void
onSuccessfulLoginAttempt
(javax.servlet.http.HttpServletRequest httpServletRequest, String userName) This is called when a user passes a login check.boolean
Validates a CAPTCHA challenge.
-
Constructor Details
-
BambooCaptchaValidationServiceImpl
-
-
Method Details
-
isRequired
Description copied from interface:BambooCaptchaValidationService
Returns whether a CAPTCHA challenge is required.- Specified by:
isRequired
in interfaceBambooCaptchaValidationService
- Parameters:
username
- The username of the user to check against.- Returns:
- Whether the CAPTCHA is required.
-
validate
Description copied from interface:BambooCaptchaValidationService
Validates a CAPTCHA challenge.- Specified by:
validate
in interfaceBambooCaptchaValidationService
- Parameters:
captchaId
- The ID of the CAPTCHA challenge to resolve.captchaResponse
- The solution for the CAPTCHA challenge.- Returns:
- Whether the CAPTCHA challenge has been resolved successfully.
-
onFailedLoginAttempt
public void onFailedLoginAttempt(javax.servlet.http.HttpServletRequest httpServletRequest, String userName) Description copied from interface:BambooCaptchaValidationService
This is called when a user fails a login check, either because they failed the elevated security check or they failed the more basic username and password check.The username MAY be null if a valid username cannot be found for example
- Specified by:
onFailedLoginAttempt
in interfaceBambooCaptchaValidationService
- Parameters:
httpServletRequest
- the HTTP request in playuserName
- the name of the user to get login information about
-
onSuccessfulLoginAttempt
public void onSuccessfulLoginAttempt(javax.servlet.http.HttpServletRequest httpServletRequest, String userName) Description copied from interface:BambooCaptchaValidationService
This is called when a user passes a login check.The username MAY be null if a valid username cannot be found for example
- Specified by:
onSuccessfulLoginAttempt
in interfaceBambooCaptchaValidationService
- Parameters:
httpServletRequest
- the HTTP request in playuserName
- the name of the user to get login information about
-