Skip to content

Fix handling of missing access token during refresh token invalidation#18964

Closed
itsmevichu wants to merge 1 commit intospring-projects:mainfrom
itsmevichu:gh-18935
Closed

Fix handling of missing access token during refresh token invalidation#18964
itsmevichu wants to merge 1 commit intospring-projects:mainfrom
itsmevichu:gh-18935

Conversation

@itsmevichu
Copy link
Contributor

Fixes #18935

This change adds a null check when invalidating the access token in OAuth2Authorization.Builder.invalidate().

This is necessary because the builder allows independent configuration of tokens, making it valid to construct an OAuth2Authorization where the access token is absent. The current implementation assumes its presence and can throw a NullPointerException during refresh token revocation.

Signed-off-by: Vishnutheep B <vishnutheep@gmail.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Mar 21, 2026
@jgrandja
Copy link
Contributor

@itsmevichu

Closing as per comment.

In the future, please hold off on submitting a fix until the team has determined a fix is needed. Thanks.

@jgrandja jgrandja closed this Mar 23, 2026
@jgrandja jgrandja self-assigned this Mar 23, 2026
@jgrandja jgrandja added status: declined A suggestion or change that we don't feel we should currently apply in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) and removed status: waiting-for-triage An issue we've not yet triaged labels Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in: oauth2 An issue in OAuth2 modules (oauth2-core, oauth2-client, oauth2-resource-server, oauth2-jose) status: declined A suggestion or change that we don't feel we should currently apply

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Potential NullPointerException when revoking refresh token if associated access token is missing

3 participants