Skip to content
Snippets Groups Projects
Unverified Commit 064a4094 authored by sohgaura's avatar sohgaura Committed by GitHub
Browse files

OIDC connector option to override jwksURI (#3543)

parent 569e0ccb
No related branches found
No related tags found
No related merge requests found
......@@ -107,10 +107,13 @@ type ProviderDiscoveryOverrides struct {
// AuthURL provides a way to user overwrite the Auth URL
// from the .well-known/openid-configuration authorization_endpoint
AuthURL string `json:"authURL"`
// JWKSURL provides a way to user overwrite the JWKS URL
// from the .well-known/openid-configuration jwks_uri
JWKSURL string `json:"jwksURL"`
}
func (o *ProviderDiscoveryOverrides) Empty() bool {
return o.TokenURL == "" && o.AuthURL == ""
return o.TokenURL == "" && o.AuthURL == "" && o.JWKSURL == ""
}
func getProvider(ctx context.Context, issuer string, overrides ProviderDiscoveryOverrides) (*oidc.Provider, error) {
......@@ -151,7 +154,9 @@ func getProvider(ctx context.Context, issuer string, overrides ProviderDiscovery
if overrides.AuthURL != "" {
config.AuthURL = overrides.AuthURL
}
if overrides.JWKSURL != "" {
config.JWKSURL = overrides.JWKSURL
}
return config.NewProvider(context.Background()), nil
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment