-
Notifications
You must be signed in to change notification settings - Fork 398
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
well-known URLs not accessible from Provider
#424
Comments
Would you mind showing an example of what you're trying to do? Are you trying to serialize the state of a Provider instance? |
@ericchiang I think he want to reuse and not fetching each time, having the same scenario , azure legging in response once in a while and I prefer to cache but deosnt seems that the functionality exists |
I have the same request. Discord's openid-configuration doesn't hold a A helper method to set the UserInfoURL manually would already help. |
in Provider EndPoint you have access to TokenURL and AuthURL after discovery but not the other (like UserInfoURL). provider, err := oidc.NewProvider(ctx, issuerUrl)
if err != nil {
log.Fatal(err)
}
fmt.Println("issuer discovery:", provider) // print all discovered information, including userinfo url
fmt.Println("TokenURL:", provider.Endpoint().TokenURL) // print Token url
fmt.Println("Token AuthURL:", provider.Endpoint().AuthURL) // print auth url |
It would be helpful to be able to call
ProviderConfig()
on Provider to return a reusable config, or make the fields not privateI'm working on a project that requires caching the OpenID discovery request.
From
Provider
I'm trying to extract the fields needed to create aProviderConfig
which I can then cache and recall usingProviderConfig.NewProvider
Is there a reason to keep fields on
Provider
private? Some are available throughUserInfoEndpoint
andEndpoint
. These aren't sensitive URLs since they're publicly available through discovery.Please let me know if there's another method for retrieving these fields that I might be missing. Thanks!
The text was updated successfully, but these errors were encountered: