recaptcha

package
v0.0.0-...-2e0bdef Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MissingInputSecret   = "google reCAPTCHA: the secret parameter is missing. refresh the page and try again"
	InvalidInputSecret   = "google reCAPTCHA: the secret parameter is invalid or malformed. refresh the page and try again"
	MissingInputResponse = "google reCAPTCHA: the response parameter is missing. refresh the page and try again"
	InvalidInputResponse = "google reCAPTCHA: the response parameter is invalid or malformed. refresh the page and try again"
	BadRequest           = "google reCAPTCHA: the request is invalid or malformed. refresh the page and try again"
	TimeoutOrDuplicate   = "" /* 128-byte string literal not displayed */
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GoogleRecaptcha

type GoogleRecaptcha struct{}

func NewGoogleRecaptcha

func NewGoogleRecaptcha() *GoogleRecaptcha

func (*GoogleRecaptcha) SiteVerify

func (r *GoogleRecaptcha) SiteVerify(ctx context.Context, secret, token string) error

type Recaptcha

type Recaptcha interface {
	SiteVerify(ctx context.Context, secret, token string) error
}

type SiteVerifyResponse

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

Directories

Path Synopsis
Package mockrecaptcha is a generated GoMock package.
Package mockrecaptcha is a generated GoMock package.

Jump to

Keyboard shortcuts

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