Skip to content
Snippets Groups Projects
Commit c830d498 authored by Tomasz Kleczek's avatar Tomasz Kleczek Committed by Tomasz Kleczek
Browse files

allow no secret for static public clients

For statically-configured public clients it should be allowed for both
Secret and SecretEnv fields to be empty.
parent 0a85a97b
No related branches found
No related tags found
No related merge requests found
...@@ -166,7 +166,7 @@ func serve(cmd *cobra.Command, args []string) error { ...@@ -166,7 +166,7 @@ func serve(cmd *cobra.Command, args []string) error {
} }
c.StaticClients[i].ID = os.Getenv(client.IDEnv) c.StaticClients[i].ID = os.Getenv(client.IDEnv)
} }
if client.Secret == "" && client.SecretEnv == "" { if client.Secret == "" && client.SecretEnv == "" && !client.Public {
return fmt.Errorf("invalid config: Secret or SecretEnv field is required for client %q", client.ID) return fmt.Errorf("invalid config: Secret or SecretEnv field is required for client %q", client.ID)
} }
if client.SecretEnv != "" { if client.SecretEnv != "" {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment