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
Expected behavior
The new generated access token is useable
Potential Codes that caused the Issue
During token revocation, OAuth2TokenRevocationAuthenticationProvider leverage on OAuth2AuthenticationProviderUtils#invalidate to add OAuth2Authorization.Token.INVALIDATED_METADATA_NAME metadata on access token.
On OAuth2RefreshTokenAuthenticationProvider#authenticate method, line 237-250, we may want to re-initiate the OAuth2Authorization.Token.INVALIDATED_METADATA_NAME metadata to false, because OAuth2Authorization#token method does inherit/copy the metadata of existing access token when we generating new access token.
Or maybe we should look at why we still allow to exchange refresh token for new access token?
jgrandja
changed the title
Any new access token generated is inactive after token revocation
Refreshed access token is inactive after token revocation
Sep 22, 2021
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
After revoking access token, any new access token generated by exchanging refresh token is invalid.
Artifact: spring-security-oauth2-authorization-server
Version: 0.2.0
To Reproduce
The following is response gotten from resource server:
HTTP/1.1 401 Unauthorized
WWW-Authenticate: Bearer error="invalid_token", error_description="Provided token isn't active", error_uri="https://tools.ietf.org/html/rfc6750#section-3.1"
Expected behavior
The new generated access token is useable
Potential Codes that caused the Issue
During token revocation, OAuth2TokenRevocationAuthenticationProvider leverage on OAuth2AuthenticationProviderUtils#invalidate to add OAuth2Authorization.Token.INVALIDATED_METADATA_NAME metadata on access token.
On OAuth2RefreshTokenAuthenticationProvider#authenticate method, line 237-250, we may want to re-initiate the OAuth2Authorization.Token.INVALIDATED_METADATA_NAME metadata to false, because OAuth2Authorization#token method does inherit/copy the metadata of existing access token when we generating new access token.
The text was updated successfully, but these errors were encountered: