Documentation ¶
Overview ¶
Legacy cloudfare captcha
Index ¶
Constants ¶
View Source
const (
CloudflareVerifyEndpoint string = "https://challenges.cloudflare.com/turnstile/v0/siteverify"
)
Variables ¶
View Source
var DependencySet = wire.NewSet( NewHTTPClient, NewCloudflareClient, )
Functions ¶
This section is empty.
Types ¶
type CloudflareClient ¶
type CloudflareClient struct { HTTPClient HTTPClient Credentials *config.Deprecated_CaptchaCloudflareCredentials }
func NewCloudflareClient ¶
func NewCloudflareClient(c *config.Deprecated_CaptchaCloudflareCredentials, httpClient HTTPClient) *CloudflareClient
func (*CloudflareClient) Verify ¶
func (c *CloudflareClient) Verify(ctx context.Context, token string, remoteip string) (*CloudflareVerificationResponse, error)
type CloudflareVerificationResponse ¶
type CloudflareVerificationResponse struct {
Success bool `json:"success"`
}
type HTTPClient ¶
func NewHTTPClient ¶
func NewHTTPClient() HTTPClient
Click to show internal directories.
Click to hide internal directories.