From 90fb9cb3e3b7842dc736de80daa4bd666a2010f5 Mon Sep 17 00:00:00 2001 From: Tom Kay Date: Mon, 2 Sep 2024 16:53:21 +0100 Subject: [PATCH 1/3] replace with apiKey for enterprise --- connectorconfig/recaptcha.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/connectorconfig/recaptcha.go b/connectorconfig/recaptcha.go index 84c2577..5fc835e 100644 --- a/connectorconfig/recaptcha.go +++ b/connectorconfig/recaptcha.go @@ -10,7 +10,7 @@ import ( type RecaptchaCredentials struct { SiteKey string `json:"siteKey" yaml:"siteKey" validate:"required"` - SecretKey string `json:"secretKey" yaml:"secretKey" validate:"required"` + ApiKey *string `json:"apiKey" yaml:"apiKey" validate:"required"` BlockThreshold float32 `json:"blockThreshold" yaml:"blockThreshold" validate:"min=0,max=1"` } @@ -27,7 +27,7 @@ func (c *RecaptchaCredentials) Validate() error { } func (c *RecaptchaCredentials) GetSecureFields() []*string { - return []*string{} + return []*string{c.ApiKey} } func (c *RecaptchaCredentials) ToConnector() connector.Connector { From 92199274c2a285ca45dbbe68386eea96593c3c3f Mon Sep 17 00:00:00 2001 From: Tom Kay Date: Tue, 3 Sep 2024 10:03:12 +0100 Subject: [PATCH 2/3] projectid --- connectorconfig/recaptcha.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/connectorconfig/recaptcha.go b/connectorconfig/recaptcha.go index 5fc835e..6a451d5 100644 --- a/connectorconfig/recaptcha.go +++ b/connectorconfig/recaptcha.go @@ -10,7 +10,7 @@ import ( type RecaptchaCredentials struct { SiteKey string `json:"siteKey" yaml:"siteKey" validate:"required"` - ApiKey *string `json:"apiKey" yaml:"apiKey" validate:"required"` + ProjectID string `json:"projectId" yaml:"projectId" validate:"required"` BlockThreshold float32 `json:"blockThreshold" yaml:"blockThreshold" validate:"min=0,max=1"` } @@ -27,7 +27,7 @@ func (c *RecaptchaCredentials) Validate() error { } func (c *RecaptchaCredentials) GetSecureFields() []*string { - return []*string{c.ApiKey} + return []*string{} } func (c *RecaptchaCredentials) ToConnector() connector.Connector { From 1a5be40232dab87a2b2e0ffdf1cf59c531adc2af Mon Sep 17 00:00:00 2001 From: Tom Kay Date: Tue, 3 Sep 2024 18:27:07 +0100 Subject: [PATCH 3/3] block threshold is no longer used --- connectorconfig/recaptcha.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/connectorconfig/recaptcha.go b/connectorconfig/recaptcha.go index 6a451d5..1a35fbf 100644 --- a/connectorconfig/recaptcha.go +++ b/connectorconfig/recaptcha.go @@ -9,9 +9,8 @@ import ( ) type RecaptchaCredentials struct { - SiteKey string `json:"siteKey" yaml:"siteKey" validate:"required"` - ProjectID string `json:"projectId" yaml:"projectId" validate:"required"` - BlockThreshold float32 `json:"blockThreshold" yaml:"blockThreshold" validate:"min=0,max=1"` + SiteKey string `json:"siteKey" yaml:"siteKey" validate:"required"` + ProjectID string `json:"projectId" yaml:"projectId" validate:"required"` } func (c *RecaptchaCredentials) GetLibrary() Library {