iriscaptchago

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2021 License: Apache-2.0 Imports: 15 Imported by: 0

README

irisCaptchaGo

irisCaptcha Golang Library to verfy

Documentation

Index

Constants

View Source
const IrisDevServer = `https://captcha.irisdev.net`

Variables

View Source
var (
	// ErrHandlerTimeout = http.ErrHandlerTimeout
	ErrSignatureInvalid = jwt.ErrSignatureInvalid
	ErrMisMachIP        = errors.New("the IPs are not matched")
	ErrInvalidSecret    = errors.New("Invalid Secret")
)

Functions

This section is empty.

Types

type IrisCaptchaHandler

type IrisCaptchaHandler interface {
	GetJs() string
	Validate(string, string) (UserResponse, error)
}

The Global Handler

func NewIrisCaptchaHandler

func NewIrisCaptchaHandler(secret string) (IrisCaptchaHandler, error)

*

  • NewIrisCaptchaHandler
  • Create a new Handle * *

func NewIrisCaptchaHandlerRemote

func NewIrisCaptchaHandlerRemote(provider string) (IrisCaptchaHandler, error)

*

  • NewIrisCaptchaHandlerRemote
  • Create a new Handle that the server is not hosted on iris dev - Premium Service * *

type UserResponse

type UserResponse struct {
	Success  bool   `json:"success"`
	Hostname string `json:"hostname"`
	IP       string `json:"ip"`
	jwt.StandardClaims
}

UserResponse : the standard defined for User Response

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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