Documentation ¶
Index ¶
Constants ¶
View Source
const AliyunCaptchaVerifyUrl = "http://afs.aliyuncs.com"
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
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 ¶
func GetCaptchaProvider ¶
func GetCaptchaProvider(captchaType string) CaptchaProvider
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)
Click to show internal directories.
Click to hide internal directories.