Interface BambooCaptchaValidationService

All Known Implementing Classes:
BambooCaptchaValidationServiceImpl

public interface BambooCaptchaValidationService
This service is used to validate a CAPTCHA challenge. It is meant to be used by other plugins such as the Authentication plugin to interface with Bamboo without having to expose underlying services.
Since:
v10.1
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    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
    validate(String captchaId, String captchaChallenge)
    Validates a CAPTCHA challenge.
  • Method Details

    • isRequired

      boolean isRequired(String username)
      Returns whether a CAPTCHA challenge is required.
      Parameters:
      username - The username of the user to check against.
      Returns:
      Whether the CAPTCHA is required.
    • validate

      boolean validate(String captchaId, String captchaChallenge)
      Validates a CAPTCHA challenge.
      Parameters:
      captchaId - The ID of the CAPTCHA challenge to resolve.
      captchaChallenge - The solution for the CAPTCHA challenge.
      Returns:
      Whether the CAPTCHA challenge has been resolved successfully.
    • onFailedLoginAttempt

      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.

      The username MAY be null if a valid username cannot be found for example

      Parameters:
      httpServletRequest - the HTTP request in play
      userName - the name of the user to get login information about
    • onSuccessfulLoginAttempt

      void onSuccessfulLoginAttempt(javax.servlet.http.HttpServletRequest httpServletRequest, String userName)
      This is called when a user passes a login check.

      The username MAY be null if a valid username cannot be found for example

      Parameters:
      httpServletRequest - the HTTP request in play
      userName - the name of the user to get login information about