-
Notifications
You must be signed in to change notification settings - Fork 370
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
Optimize cleanupTokenByTokenValue logic #2508
base: master
Are you sure you want to change the base?
Optimize cleanupTokenByTokenValue logic #2508
Conversation
PR builder started |
...rbon.identity.oauth/src/main/java/org/wso2/carbon/identity/oauth2/dao/OldTokensCleanDAO.java
Outdated
Show resolved
Hide resolved
PR builder completed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving the pull request based on the successful pr build https://github.com/wso2/product-is/actions/runs/9695418391
@@ -64,48 +64,57 @@ public void cleanupTokenByTokenId(String tokenId, Connection connection) throws | |||
} | |||
} | |||
|
|||
public void cleanupTokenByTokenValue(String token, Connection connection) throws SQLException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is it ok to remove public method here?
* @param connection Database connection. | ||
* @throws SQLException If an error occurs while cleaning up the token. | ||
*/ | ||
public void cleanupTokenByTokenValue(String tokenHash, Connection connection) throws SQLException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
name should be cleanupTokenByTokenHash
?
Proposed changes in this pull request
In this PR the
cleanupTokenByTokenValue
method will be optimized so that the select query related to prepare theoldAccessTokenObject
will be executed only when theretain_access_tokens_for_auditing
config is enabled.A new token deletion logic has been introduced to use the token hash, instead of the ID.
Related issues: wso2/product-is#20601