Class BambooCaptchaValidationServiceImpl

java.lang.Object
com.atlassian.bamboo.user.authentication.BambooCaptchaValidationServiceImpl
All Implemented Interfaces:
BambooCaptchaValidationService

public class BambooCaptchaValidationServiceImpl extends Object implements BambooCaptchaValidationService
  • Constructor Details

    • BambooCaptchaValidationServiceImpl

      public BambooCaptchaValidationServiceImpl(LoginInformationManager loginInformationManager)
  • Method Details

    • isRequired

      public boolean isRequired(String username)
      Description copied from interface: BambooCaptchaValidationService
      Returns whether a CAPTCHA challenge is required.
      Specified by:
      isRequired in interface BambooCaptchaValidationService
      Parameters:
      username - The username of the user to check against.
      Returns:
      Whether the CAPTCHA is required.
    • validate

      public boolean validate(String captchaId, String captchaResponse)
      Description copied from interface: BambooCaptchaValidationService
      Validates a CAPTCHA challenge.
      Specified by:
      validate in interface BambooCaptchaValidationService
      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 interface BambooCaptchaValidationService
      Parameters:
      httpServletRequest - the HTTP request in play
      userName - 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 interface BambooCaptchaValidationService
      Parameters:
      httpServletRequest - the HTTP request in play
      userName - the name of the user to get login information about