captcha

package
v0.0.0-...-1561e87 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudflareTurnstile

type CloudflareTurnstile struct {
	URL       string
	SiteKey   string
	SecretKey string
}

func (*CloudflareTurnstile) Verify

func (c *CloudflareTurnstile) Verify(token string, clientIP string) (success bool, err error)

type GoogleRecaptcha

type GoogleRecaptcha struct {
	URL       string
	SiteKey   string
	SecretKey string
	Threshold float64
}

func (*GoogleRecaptcha) Verify

func (g *GoogleRecaptcha) Verify(token string, clientIP string) (success bool, err error)

type ICaptcha

type ICaptcha interface {
	Verify(token string, clientIP string) (success bool, err error)
}

func NewCaptcha

func NewCaptcha() ICaptcha

func NewCloudflareTurnstile

func NewCloudflareTurnstile() ICaptcha

func NewGoogleRecaptcha

func NewGoogleRecaptcha() ICaptcha

Jump to

Keyboard shortcuts

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