only validate config when auth is enabled

Co-authored-by: reese <45641995+reesporte@users.noreply.github.com>
This commit is contained in:
souhailanoor 2021-12-03 11:58:08 -06:00 committed by GitHub
parent cebba84bee
commit e8f5458100
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -610,6 +610,9 @@ func lookupAddr(ctx context.Context, resolver *net.Resolver, host string) (strin
}
func (c *Config) ValidateAuth() ([]error, error) {
if !c.Auth.Enable {
return []error{}, nil
}
authConfig := map[string]string{
"ClientId": c.Auth.ClientId,
"ClientSecret": c.Auth.ClientSecret,