Skip to content

token_type_hint should be used as a hint only #175

Closed
@rozagerardo

Description

@rozagerardo

Describe the bug
Currently, if we pass a token_type_hint parameter that doesn't match the token we passed, the token is not revoked. the parameter should be just a hint to find the token, but as indicated in the specs, if it is not found using the token_type_hint value, then the rest of the supported types should be used:

If the server is unable to locate the token using the given hint, it MUST extend its search across all of its supported token types.

To Reproduce
1- Issue an Access Token
2- Send a request as follows:

curl --location --request POST 'http://localhost:9000/oauth2/revoke' \
--header 'Authorization: Basic bWVzc2FnaW5nLWNsaWVudDpzZWNyZXQ=' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'token=<access_token>' \
--data-urlencode 'token_type_hint=refresh_token'

3- Server responds with 200, but the token is not revoked

Expected behavior
Server should still revoke the Access Token

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions