cmd/dex: validate that connectors have an ID.
This commit is contained in:
parent
e1f6679107
commit
a2b78c28fc
@ -113,6 +113,9 @@ func serve(cmd *cobra.Command, args []string) error {
|
|||||||
|
|
||||||
connectors := make([]server.Connector, len(c.Connectors))
|
connectors := make([]server.Connector, len(c.Connectors))
|
||||||
for i, conn := range c.Connectors {
|
for i, conn := range c.Connectors {
|
||||||
|
if conn.ID == "" {
|
||||||
|
return fmt.Errorf("no ID field for connector %d", i)
|
||||||
|
}
|
||||||
if conn.Config == nil {
|
if conn.Config == nil {
|
||||||
return fmt.Errorf("no config field for connector %q", conn.ID)
|
return fmt.Errorf("no config field for connector %q", conn.ID)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user