recaptcha

package module
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2025 License: Apache-2.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

captcha google v2

This plugin uses google recaptcha to replace the default graphical verification code

Notice

This plug-in needs to load Google resources. Before using it, please make sure that the network can fully load related resources.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Info embed.FS

Functions

This section is empty.

Types

type Captcha

type Captcha struct {
	Config *CaptchaConfig
}

func (*Captcha) ConfigFields

func (c *Captcha) ConfigFields() []plugin.ConfigField

func (*Captcha) ConfigReceiver

func (c *Captcha) ConfigReceiver(config []byte) error

func (*Captcha) Create

func (c *Captcha) Create() (captcha, code string)

func (*Captcha) GetConfig

func (c *Captcha) GetConfig() (config string)

func (*Captcha) Info

func (c *Captcha) Info() plugin.Info

func (*Captcha) Verify

func (c *Captcha) Verify(captcha, userInput string) (pass bool)

type CaptchaConfig

type CaptchaConfig struct {
	SiteKey            string `json:"site_key"`
	SecretKey          string `json:"secret_key"`
	SiteVerifyEndpoint string `json:"site_verify_endpoint"`
}

type GoogleCaptchaResponse

type GoogleCaptchaResponse struct {
	Success    bool     `json:"success"`
	ErrorCodes []string `json:"error-codes"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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