mirror of
https://github.com/project-zot/zot.git
synced 2026-06-16 04:17:55 +08:00
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:
@@ -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"`
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user