-
Notifications
You must be signed in to change notification settings - Fork 405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support provider without discovery #319
Comments
There's not a way. To verify ID tokens, the expectation is to create an IDTokenVerifier with NewVerifier https://pkg.go.dev/github.com/coreos/go-oidc/v3/oidc#NewVerifier Does that work for your use case? |
Only if there is also a way to get I solved that on a fork by exporting the fields of the |
There was some discussion of exposing UserInfo parsing That way in your callback you could do:
Would that work? |
Yes, I guess it would work if I re-implement the UserInfo fetching and parsing, but I would prefer to use your implementation. |
The suggestion in #319 (comment) is to export the parsing, so you'd be in charge of the fetching, but not the parsing. Hmm, maybe it's be clearer to provide a NewProvider function type ProviderConfig struct {
IssuerURL string
AuthURL string
TokenURL string
UserInfoURL string
Algorithms []string
}
// NewProvider builds a provider without using discovery. Specific methods may not work
// depending on what URLs are supplied.
func NewProvider(c ProviderConfig) (*Provider, error) {} The issue is that certain Provider may not work if you don't provide these fields. E.g. https://pkg.go.dev/github.com/coreos/go-oidc/v3/oidc#Provider.Verifier So it may not make sense to actually have a Provider that returns gibberish. |
That would work for my use case (except that the code snippet misses |
HI! |
Yes, that's true, I can hack my way around the unexported fields using reflect. |
Joining the party. Is there a compelling reason to not implement #319 (comment)? For client applications it's a pain to do the OIDC discovery roundtrips all the time. |
Fixed with #333 |
@ericchiang any idea how I could actually require this version?
|
Sorry for the noise. This solves it:
|
Is there a way to initialize a provider which doesn't implement the OpenID Connect Discovery spec, i.e. doesn't have a
.well-known/openid-configuration
JSON file? I would like to be able to specify the configuration myself in that case, for example:The
Provider
fields are not exported, so I can't do it like that.The text was updated successfully, but these errors were encountered: