Skip to content

Commit 04686b2

Browse files
authored
chore: 'omitempty' to Oauth2 fields with type Secret to avoid requiring them (#864)
Signed-off-by: Jorge Turrado <[email protected]>
1 parent 0b2fbf3 commit 04686b2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

config/http_config.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,13 +239,13 @@ func (u URL) MarshalJSON() ([]byte, error) {
239239
// OAuth2 is the oauth2 client configuration.
240240
type OAuth2 struct {
241241
ClientID string `yaml:"client_id" json:"client_id"`
242-
ClientSecret Secret `yaml:"client_secret" json:"client_secret"`
242+
ClientSecret Secret `yaml:"client_secret,omitempty" json:"client_secret,omitempty"`
243243
ClientSecretFile string `yaml:"client_secret_file" json:"client_secret_file"`
244244
// ClientSecretRef is the name of the secret within the secret manager to use as the client
245245
// secret.
246246
ClientSecretRef string `yaml:"client_secret_ref" json:"client_secret_ref"`
247247
ClientCertificateKeyID string `yaml:"client_certificate_key_id" json:"client_certificate_key_id"`
248-
ClientCertificateKey Secret `yaml:"client_certificate_key" json:"client_certificate_key"`
248+
ClientCertificateKey Secret `yaml:"client_certificate_key,omitempty" json:"client_certificate_key,omitempty"`
249249
ClientCertificateKeyFile string `yaml:"client_certificate_key_file" json:"client_certificate_key_file"`
250250
// ClientCertificateKeyRef is the name of the secret within the secret manager to use as the client
251251
// secret.

0 commit comments

Comments
 (0)