Class CaptchaManager


  • @Service
    public class CaptchaManager
    extends Object
    • Constructor Detail

      • CaptchaManager

        public CaptchaManager()
    • Method Detail

      • init

        @PostConstruct
        public void init()
      • verifyCaptchaToken

        public boolean verifyCaptchaToken​(String captchaToken)
                                   throws ApiKeyException
        Verify Captcha token by sending request to the verification URL. Response is a JSON with a field "success" indicating true or false. When it's false "error-codes" field contains reason of failure.
        Parameters:
        captchaToken - Token to be verified.
        Returns:
        true when verification successful, false when there was problem with verification response
        Throws:
        ApiKeyException - when there was false response, exception contains error code
      • close

        @PreDestroy
        public void close()