geetest

package module
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: MIT Imports: 9 Imported by: 0

README

Geetest

Geetest captcha package for Goravel, support Geetest v4.

Documentation

Index

Constants

View Source
const Binding = "geetest"

Variables

Functions

This section is empty.

Types

type Geetest

type Geetest struct {
	CaptchaID  string
	CaptchaKey string
	// contains filtered or unexported fields
}

func NewGeetest

func NewGeetest(config config.Config) *Geetest

func (*Geetest) Verify

func (r *Geetest) Verify(ticket Ticket) (bool, error)

type Response

type Response struct {
	// 失败时返回
	Status string `json:"status"`
	Code   string `json:"code"`
	Msg    string `json:"msg"`
	// 成功时返回
	Result      string         `json:"result"`
	Reason      string         `json:"reason"`
	CaptchaArgs map[string]any `json:"captcha_args"`
}

type ServiceProvider

type ServiceProvider struct {
}

func (*ServiceProvider) Boot

func (receiver *ServiceProvider) Boot(app foundation.Application)

func (*ServiceProvider) Register

func (receiver *ServiceProvider) Register(app foundation.Application)

type Ticket

type Ticket struct {
	LotNumber     string `json:"lot_number"`
	CaptchaOutput string `json:"captcha_output"`
	PassToken     string `json:"pass_token"`
	GenTime       string `json:"gen_time"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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