Skip to content

Commit

Permalink
Adjust provider sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
Teko012 committed Aug 21, 2024
1 parent 03da9f5 commit d4b8195
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions pkg/apis/options/providers.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ const (
// BitbucketProvider is the provider type for Bitbucket
BitbucketProvider ProviderType = "bitbucket"

// CidaasProvider is the provider type for Cidaas IDP
CidaasProvider ProviderType = "cidaas"

// DigitalOceanProvider is the provider type for DigitalOcean
DigitalOceanProvider ProviderType = "digitalocean"

Expand Down Expand Up @@ -136,9 +139,6 @@ const (

// OIDCProvider is the provider type for OIDC
OIDCProvider ProviderType = "oidc"

// CidaasProvider is the provider type for Cidaas IDP
CidaasProvider ProviderType = "cidaas"
)

type KeycloakOptions struct {
Expand Down
6 changes: 3 additions & 3 deletions providers/providers.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ func NewProvider(providerConfig options.Provider) (Provider, error) {
return NewAzureProvider(providerData, providerConfig.AzureConfig), nil
case options.BitbucketProvider:
return NewBitbucketProvider(providerData, providerConfig.BitbucketConfig), nil
case options.CidaasProvider:
return NewCIDAASProvider(providerData), nil
case options.DigitalOceanProvider:
return NewDigitalOceanProvider(providerData), nil
case options.FacebookProvider:
Expand All @@ -65,8 +67,6 @@ func NewProvider(providerConfig options.Provider) (Provider, error) {
return NewNextcloudProvider(providerData), nil
case options.OIDCProvider:
return NewOIDCProvider(providerData, providerConfig.OIDCConfig), nil
case options.CidaasProvider:
return NewCIDAASProvider(providerData), nil
default:
return nil, fmt.Errorf("unknown provider type %q", providerConfig.Type)
}
Expand Down Expand Up @@ -183,7 +183,7 @@ func providerRequiresOIDCProviderVerifier(providerType options.ProviderType) (bo
case options.BitbucketProvider, options.DigitalOceanProvider, options.FacebookProvider, options.GitHubProvider,
options.GoogleProvider, options.KeycloakProvider, options.LinkedInProvider, options.LoginGovProvider, options.NextCloudProvider:
return false, nil
case options.ADFSProvider, options.AzureProvider, options.GitLabProvider, options.KeycloakOIDCProvider, options.OIDCProvider, options.CidaasProvider:
case options.ADFSProvider, options.AzureProvider, options.CidaasProvider, options.GitLabProvider, options.KeycloakOIDCProvider, options.OIDCProvider:
return true, nil
default:
return false, fmt.Errorf("unknown provider type: %s", providerType)
Expand Down

0 comments on commit d4b8195

Please sign in to comment.