Add Cap Captcha support (#2511)
* Add Cap Captcha support - Add CaptchaCap type constant in types.go - Add Cap struct with InstanceURL, KeyID, and KeySecret fields - Add CapCaptcha method in provider.go to return Cap settings - Add default settings for Cap captcha in setting.go - Implement Cap captcha verification logic in middleware - Expose Cap captcha settings in site API This adds support for Cap captcha service as an alternative captcha option alongside existing reCAPTCHA, Turnstile and built-in captcha options. * update cap json tags
This commit is contained in:
@@ -28,6 +28,7 @@ const (
|
||||
CaptchaReCaptcha = CaptchaType("recaptcha")
|
||||
CaptchaTcaptcha = CaptchaType("tcaptcha")
|
||||
CaptchaTurnstile = CaptchaType("turnstile")
|
||||
CaptchaCap = CaptchaType("cap")
|
||||
)
|
||||
|
||||
type ReCaptcha struct {
|
||||
@@ -47,6 +48,12 @@ type Turnstile struct {
|
||||
Secret string
|
||||
}
|
||||
|
||||
type Cap struct {
|
||||
InstanceURL string
|
||||
KeyID string
|
||||
KeySecret string
|
||||
}
|
||||
|
||||
type SMTP struct {
|
||||
FromName string
|
||||
From string
|
||||
|
||||
Reference in New Issue
Block a user