feat(authn): add generic oidc and allow customizable name (#1691)

Rebased and squashed

Signed-off-by: Damien Degois <damien@degois.info>
This commit is contained in:
Damien Degois
2023-08-24 11:33:35 +02:00
committed by GitHub
parent 247f6dcd3f
commit 289acfabbd
14 changed files with 78 additions and 56 deletions
+3 -1
View File
@@ -24,7 +24,9 @@ type BearerConfig struct {
Service string `json:"service,omitempty"`
}
type OpenIDProviderConfig struct{}
type OpenIDProviderConfig struct {
Name string `json:"name,omitempty" mapstructure:"name"`
}
type OpenIDConfig struct {
Providers map[string]OpenIDProviderConfig `json:"providers,omitempty" mapstructure:"providers"`
+1 -1
View File
@@ -566,7 +566,7 @@ func TestMgmtExtension(t *testing.T) {
conf.HTTP.Auth.Bearer = nil
openIDProviders := make(map[string]config.OpenIDProviderConfig)
openIDProviders["dex"] = config.OpenIDProviderConfig{
openIDProviders["oidc"] = config.OpenIDProviderConfig{
ClientID: mockOIDCConfig.ClientID,
ClientSecret: mockOIDCConfig.ClientSecret,
Issuer: mockOIDCConfig.Issuer,