ReCaptcha

Pydantic model

pydantic model iperon.contrib.recaptcha.ReCaptcha

Show JSON schema
{
   "title": "ReCaptcha",
   "type": "object",
   "properties": {
      "success": {
         "title": "Success",
         "type": "boolean"
      },
      "error-codes": {
         "title": "Error-Codes",
         "default": [],
         "type": "array",
         "items": {
            "type": "string"
         }
      }
   },
   "required": [
      "success"
   ]
}

Fields
field error_codes: list[str] = [] (alias 'error-codes')
field success: bool [Required]
async classmethod check(ip: iperon.contrib.ip.IP, response: str, secret_key: pydantic.types.SecretStr = SecretStr('**********'))

Checks the success of the verification

Parameters
  • ip (IP) – Remote ip address

  • response (str) – Validation result from the form

  • secret_key (Union[str, SecretStr]) – secret key from ReCaptcha

Returns

Returns ReCaptcha object

Return type

ReCaptcha