lib/promauth: do not show empty values in oauth2 config section at /config page

This commit is contained in:
Aliaksandr Valialkin 2021-11-05 12:53:12 +02:00
parent 3db1f2d550
commit e73a82f7a5
No known key found for this signature in database
GPG key ID: A72BEC6CD3D0DED1

View file

@ -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.