You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
After calling introspect token endpoint with an access token and token_type_hint is refresh_token, Its response has an "active" field is true.
I found this line of code in OAuth2TokenIntrospectionAuthenticationProvider. OAuth2Authorization authorization = this.authorizationService.findByToken(tokenIntrospectionAuthentication.getToken(), null);
I think we should use tokenTypeHint in tokenIntrospectionAuthentication instead of null.
token_type_hint
OPTIONAL. A hint about the type of the token submitted for
introspection. The protected resource MAY pass this parameter to
help the authorization server optimize the token lookup. 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. An
authorization server MAY ignore this parameter, particularly if it
is able to detect the token type automatically. Values for this
field are defined in the "OAuth Token Type Hints" registry defined
in OAuth Token Revocation [RFC7009].
Notice the wording in BOLD. Both OAuth2TokenIntrospectionAuthenticationProvider and OAuth2TokenRevocationAuthenticationProvider ignore the token_type_hint parameter by design.
Please also see gh-175 and this specific comment for further details.
Describe the bug
After calling introspect token endpoint with an access token and token_type_hint is refresh_token, Its response has an "active" field is true.
I found this line of code in OAuth2TokenIntrospectionAuthenticationProvider.
OAuth2Authorization authorization = this.authorizationService.findByToken(tokenIntrospectionAuthentication.getToken(), null);
I think we should use tokenTypeHint in tokenIntrospectionAuthentication instead of null.
To Reproduce
Postman console log:
Expected behavior
Be able to check token base on token type hint.
The text was updated successfully, but these errors were encountered: