From bc72b83102958ddff1fced57abb4586153b2beab Mon Sep 17 00:00:00 2001 From: Aliaksandr Valialkin Date: Fri, 5 Nov 2021 12:53:12 +0200 Subject: [PATCH] lib/promauth: do not show empty values in `oauth2` config section at `/config` page --- lib/promauth/config.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/promauth/config.go b/lib/promauth/config.go index 5ac8943553..ee669b0280 100644 --- a/lib/promauth/config.go +++ b/lib/promauth/config.go @@ -66,11 +66,11 @@ type ProxyClientConfig struct { // OAuth2Config represent OAuth2 configuration type OAuth2Config struct { ClientID string `yaml:"client_id"` - ClientSecret string `yaml:"client_secret"` - ClientSecretFile string `yaml:"client_secret_file"` - Scopes []string `yaml:"scopes"` + ClientSecret string `yaml:"client_secret,omitempty"` + ClientSecretFile string `yaml:"client_secret_file,omitempty"` + Scopes []string `yaml:"scopes,omitempty"` TokenURL string `yaml:"token_url"` - EndpointParams map[string]string `yaml:"endpoint_params"` + EndpointParams map[string]string `yaml:"endpoint_params,omitempty"` } // String returns string representation of o.