Skip to content

Commit

Permalink
Merge pull request wso2-extensions#1356 from sadilchamishka/fix-db-gr…
Browse files Browse the repository at this point in the history
…owth-5.10

[U2][5.10.0] Stop adding unwanted delete queries in IDN_AUTH_SESSION_STORE
  • Loading branch information
sadilchamishka authored Apr 12, 2023
2 parents 5df8704 + 2dd4628 commit b6ea64d
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.identity.application.authentication.framework.model.AuthenticatedUser;
Expand All @@ -30,6 +31,7 @@
import org.wso2.carbon.identity.oauth.OAuthUtil;
import org.wso2.carbon.identity.oauth.cache.AuthorizationGrantCache;
import org.wso2.carbon.identity.oauth.cache.AuthorizationGrantCacheKey;
import org.wso2.carbon.identity.oauth.common.OAuthConstants;
import org.wso2.carbon.identity.oauth.util.ClaimCache;
import org.wso2.carbon.identity.oauth.util.ClaimCacheKey;
import org.wso2.carbon.identity.oauth.util.ClaimMetaDataCache;
Expand Down Expand Up @@ -315,6 +317,10 @@ private void removeAccessTokensFromCache(Set<AccessTokenDO> accessTokenDOSet) {

if (CollectionUtils.isNotEmpty(accessTokenDOSet)) {
for (AccessTokenDO accessTokenDO : accessTokenDOSet) {
if (StringUtils.equalsIgnoreCase(OAuthConstants.GrantTypes.PASSWORD,
accessTokenDO.getGrantType())) {
continue;
}
String accessToken = accessTokenDO.getAccessToken();
String tokenId = accessTokenDO.getTokenId();
AuthorizationGrantCacheKey cacheKey = new AuthorizationGrantCacheKey(accessToken);
Expand Down

0 comments on commit b6ea64d

Please sign in to comment.