1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-04 02:37:14 +00:00

add remoteip and sitekey optional fields to hcaptcha middleware

as suggested on the kataras/hcaptcha package
This commit is contained in:
Gerasimos (Makis) Maropoulos
2022-09-19 14:39:23 +03:00
parent 80f5699d37
commit a559a2928e
2 changed files with 42 additions and 13 deletions

View File

@@ -49,11 +49,8 @@ func New(secret string) context.Handler {
}
}
// SiteVerify accepts context and the secret key(https://www.google.com/recaptcha)
//
// and returns the google's recaptcha response, if `response.Success` is true
//
// then validation passed.
// SiteVerify accepts context and the secret key(https://www.google.com/recaptcha) and
// returns the google's recaptcha response, if `response.Success` is true then validation passed.
//
// Use `New` for middleware use instead.
func SiteVerify(ctx *context.Context, secret string) (response Response) {