Documentation
¶
Overview ¶
Package captcha provides server-side verification for InfoPeak Captcha, the privacy-first, EU-hosted captcha.
Index ¶
Constants ¶
View Source
const Field = "infopeak-captcha-response"
Field is the name of the hidden form field the widget injects.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
Sitekey string
Secret string
// APIOrigin overrides the API origin. Defaults to https://captcha.infopeak.io
APIOrigin string
// HTTPClient overrides the HTTP client. Defaults to a client with an 8s timeout.
HTTPClient *http.Client
}
Client verifies InfoPeak Captcha tokens.
func (*Client) Verify ¶
Verify reports whether the token was genuine and had not been used before. It fails closed: network errors and non-200 responses return false.
func (*Client) VerifyDetailed ¶
VerifyDetailed verifies a token and returns the full result, including whether the sitekey is over its monthly quota.
Click to show internal directories.
Click to hide internal directories.