Skip to content

Commit

Permalink
feat(authn): add generic oidc and allow customizable name
Browse files Browse the repository at this point in the history
Signed-off-by: Damien Degois <[email protected]>
  • Loading branch information
babs committed Aug 11, 2023
1 parent cad564b commit 8418ccd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
5 changes: 3 additions & 2 deletions pkg/api/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ var (
BinaryType string //nolint: gochecknoglobals
GoVersion string //nolint: gochecknoglobals

openIDSupportedProviders = [...]string{"google", "gitlab", "dex"} //nolint: gochecknoglobals
oauth2SupportedProviders = [...]string{"github"} //nolint: gochecknoglobals
openIDSupportedProviders = [...]string{"google", "gitlab", "dex", "oidc"} //nolint: gochecknoglobals
oauth2SupportedProviders = [...]string{"github"} //nolint: gochecknoglobals

)

Expand Down Expand Up @@ -64,6 +64,7 @@ type OpenIDConfig struct {
}

type OpenIDProviderConfig struct {
Name string
ClientID string
ClientSecret string
KeyPath string
Expand Down
4 changes: 3 additions & 1 deletion pkg/extensions/extension_mgmt.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down

0 comments on commit 8418ccd

Please sign in to comment.