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

fix: introspect and revoke to spec and return falsey instead of throwing #154

Merged
merged 1 commit into from
Aug 10, 2024

Conversation

jasonraimondi
Copy link
Owner

Description

Fix /revoke to no longer throw on invalid tokens, and instead return 200

Note: invalid tokens do not cause an error response since the client
cannot handle such an error in a reasonable way. Moreover, the
purpose of the revocation request, invalidating the particular token,
is already achieved.

https://datatracker.ietf.org/doc/html/rfc7009#section-2.2

Fix /introspect to no longer throw on invalid tokens, instead return 200 with { active: false }

If the introspection call is properly authorized but the token is not
active, does not exist on this server, or the protected resource is
not allowed to introspect this particular token, then the
authorization server MUST return an introspection response with the
"active" field set to "false". Note that to avoid disclosing too
much of the authorization server's state to a third party, the
authorization server SHOULD NOT include any additional information
about an inactive token, including why the token is inactive.

https://datatracker.ietf.org/doc/html/rfc7662#section-2.2

@jasonraimondi jasonraimondi force-pushed the fix/revoke-does-not-throw-for-invalid-tokens branch from fa5b3bb to 06b35ef Compare August 10, 2024 02:36
@jasonraimondi jasonraimondi merged commit 3aa2956 into main Aug 10, 2024
6 checks passed
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

Successfully merging this pull request may close these issues.

1 participant