captcha

package
v1.737.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2024 License: Apache-2.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

View Source
const AliyunCaptchaVerifyUrl = "http://afs.aliyuncs.com"
View Source
const CloudflareTurnstileVerifyUrl = "https://challenges.cloudflare.com/turnstile/v0/siteverify"
View Source
const GEETESTCaptchaVerifyUrl = "http://gcaptcha4.geetest.com/validate"
View Source
const HCaptchaVerifyUrl = "https://hcaptcha.com/siteverify"
View Source
const ReCaptchaVerifyUrl = "https://recaptcha.net/recaptcha/api/siteverify"

Variables

This section is empty.

Functions

func VerifyCaptchaByCaptchaType added in v1.145.0

func VerifyCaptchaByCaptchaType(captchaType, token, clientSecret string) (bool, error)

Types

type AliyunCaptchaProvider added in v1.62.0

type AliyunCaptchaProvider struct{}

func NewAliyunCaptchaProvider added in v1.62.0

func NewAliyunCaptchaProvider() *AliyunCaptchaProvider

func (*AliyunCaptchaProvider) VerifyCaptcha added in v1.62.0

func (captcha *AliyunCaptchaProvider) VerifyCaptcha(token, clientSecret string) (bool, error)

type CaptchaProvider

type CaptchaProvider interface {
	VerifyCaptcha(token, clientSecret string) (bool, error)
}

func GetCaptchaProvider

func GetCaptchaProvider(captchaType string) CaptchaProvider

type CloudflareTurnstileProvider added in v1.167.0

type CloudflareTurnstileProvider struct{}

func NewCloudflareTurnstileProvider added in v1.167.0

func NewCloudflareTurnstileProvider() *CloudflareTurnstileProvider

func (*CloudflareTurnstileProvider) VerifyCaptcha added in v1.167.0

func (captcha *CloudflareTurnstileProvider) VerifyCaptcha(token, clientSecret string) (bool, error)

type DefaultCaptchaProvider

type DefaultCaptchaProvider struct{}

func NewDefaultCaptchaProvider

func NewDefaultCaptchaProvider() *DefaultCaptchaProvider

func (*DefaultCaptchaProvider) VerifyCaptcha

func (captcha *DefaultCaptchaProvider) VerifyCaptcha(token, clientSecret string) (bool, error)

type GEETESTCaptchaProvider added in v1.81.0

type GEETESTCaptchaProvider struct{}

func NewGEETESTCaptchaProvider added in v1.81.0

func NewGEETESTCaptchaProvider() *GEETESTCaptchaProvider

func (*GEETESTCaptchaProvider) VerifyCaptcha added in v1.81.0

func (captcha *GEETESTCaptchaProvider) VerifyCaptcha(token, clientSecret string) (bool, error)

type HCaptchaProvider

type HCaptchaProvider struct{}

func NewHCaptchaProvider

func NewHCaptchaProvider() *HCaptchaProvider

func (*HCaptchaProvider) VerifyCaptcha

func (captcha *HCaptchaProvider) VerifyCaptcha(token, clientSecret string) (bool, error)

type ReCaptchaProvider

type ReCaptchaProvider struct{}

func NewReCaptchaProvider

func NewReCaptchaProvider() *ReCaptchaProvider

func (*ReCaptchaProvider) VerifyCaptcha

func (captcha *ReCaptchaProvider) VerifyCaptcha(token, clientSecret string) (bool, error)

Jump to

Keyboard shortcuts

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