-
Notifications
You must be signed in to change notification settings - Fork 36
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
Add support for token revocation #126
Conversation
609ddf5
to
59ad568
Compare
59ad568
to
84a4526
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! High quality PR, awesome!
There are currently unittests in the test/ directory. Running 'npm test' should execute them. If you're not comfortable adding these I'll find some time writing them
Thank you!
More specifically, I was looking for tests that invoke |
No, this library doesn't have a 100% coverage , but I've been trying to add them with every change or new feature |
I'll see what I can do |
Ok, have a look, let me know what you think |
src/messages.ts
Outdated
token_type_hint?: OAuth2TokenTypeHint | ||
} | ||
|
||
export type RevocationResponse = {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just took a look at the spec and it looks like there's no requirement for servers to return JSON. So if a revoke endpoint returns something else, parsing the response body will likely result in an exception
Geez my last 2 comments were in 'draft' for a month and a half , sorry . Forgot to hit the green button |
This PR adds support for token revocation. It's implemented similarly to how token introspection is implemented. Let me know what you think. Happy to write tests too just let me know how you'd like them structured and where. I didn't see an obvious place for the tests to live.
Usage:
Fixes #125