captcha

package
v1.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 2, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Captcha

type Captcha interface {
	Verify() (verified bool, errCodes string)
}

type GoogleCaptcha

type GoogleCaptcha struct {
	Token     string
	Remoteip  string
	SecretKey string // google reCaptcha Secret Key
}

func (*GoogleCaptcha) Verify

func (c *GoogleCaptcha) Verify() (verified bool, errCodes string)

https://developers.google.com/recaptcha/docs/verify Each reCAPTCHA user response token is valid for two minutes, and can only be verified once to prevent replay attacks. If you need a new token, you can re-run the reCAPTCHA verification. 注意:坑:post请求的参数不在body里,不是json

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL