Skip to content
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

Adding Revoke and Introspect methods to Provider #246

Closed
mfridman opened this issue May 5, 2020 · 2 comments
Closed

Adding Revoke and Introspect methods to Provider #246

mfridman opened this issue May 5, 2020 · 2 comments

Comments

@mfridman
Copy link

mfridman commented May 5, 2020

Thanks for your continued support of this package.

Re #232 I like the idea of dropping the /x/oauth2 pkg and using this package exclusively when interfacing with oidc servers. But as you mentioned, this might be out-of-scope for v3.

What are your thoughts on adding support for additional endpoints:

We could add the endpoint URLs to the Provider struct and add 2 new methods:

  • Revoke(..)
  • Introspect(..)

I don't think these are mandatory, so calling these methods on empty URLs would return ErrNotSupported.

Thoughts?

@ericchiang
Copy link
Collaborator

I don't see anything in either of those RFCs about OpenID Connect :) You can already do this today:

p, err := oidc.NewProvider(ctx, issuerURL)
if err != nil {
    // ...
}
var c struct {
    RevocationEndpoint    string `json:"revocation_endpoint"`
    IntrospectionEndpoint string `json:"introspection_endpoint"`
}
if err := p.Claims(&c); err != nil {
    // ...
}

If that covers your use case I'm inclined to leave as is.

@mfridman
Copy link
Author

mfridman commented May 5, 2020

Ye, not part of OIDC.

I figured it might be useful to have these two endpoints, similar to UserInfo which fetches from userinfo_endpoint but instead here we'd inspect/revoke tokens.

Easy enough to implement outside this core (no pun intended ;) package.

In retrospect, keeping this package lean makes sense sense.

p.s. @ericchiang if you need any help or need early users for v3 happy to help.

@mfridman mfridman closed this as completed May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants