Просмотр исходного кода

Add an optional client secret field.

Mariano Cano 7 лет назад
Родитель
Сommit
2c0c0112c6
1 измененных файлов с 4 добавлено и 0 удалено
  1. 4 0
      authority/provisioner/oidc.go

+ 4 - 0
authority/provisioner/oidc.go

@@ -41,10 +41,14 @@ type openIDPayload struct {
 }
 
 // OIDC represents an OAuth 2.0 OpenID Connect provider.
+//
+// ClientSecret is optional, and it will be only necessary if an implicit flow
+// is not available, the value will be visible in the provisioners endpoint.
 type OIDC struct {
 	Type                  string   `json:"type"`
 	Name                  string   `json:"name"`
 	ClientID              string   `json:"clientID"`
+	ClientSecret          string   `json:"clientSecret,omitempty"`
 	ConfigurationEndpoint string   `json:"configurationEndpoint"`
 	Claims                *Claims  `json:"claims,omitempty"`
 	Admins                []string `json:"admins,omitempty"`