captcha

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RecaptchaService

type RecaptchaService struct {
	SecretKeyV2 string
	SecretKeyV3 string
}

func NewRecaptchaService

func NewRecaptchaService(
	secretKeyV2 string,
	secretKeyV3 string,
) *RecaptchaService

func (*RecaptchaService) VerifyV2

func (rs *RecaptchaService) VerifyV2(response, remoteIP string) error

func (*RecaptchaService) VerifyV3

func (rs *RecaptchaService) VerifyV3(response, remoteIP string) error

type SiteVerifyResponse

type SiteVerifyResponse struct {
	Success     bool      `json:"success"`
	Score       float64   `json:"score"`
	Action      string    `json:"action"`
	ChallengeTS time.Time `json:"challenge_ts"`
	Hostname    string    `json:"hostname"`
	ErrorCodes  []string  `json:"error-codes"`
}

Jump to

Keyboard shortcuts

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