Repository: cxf Updated Branches: refs/heads/3.1.x-fixes 4e8908467 -> 6fc117a3b
Minor updates to JCache provider Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/6fc117a3 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/6fc117a3 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/6fc117a3 Branch: refs/heads/3.1.x-fixes Commit: 6fc117a3bf1fd0d380e9721510cc3ef067d1891e Parents: 4e89084 Author: Sergey Beryozkin <[email protected]> Authored: Fri Jun 2 17:26:08 2017 +0100 Committer: Sergey Beryozkin <[email protected]> Committed: Fri Jun 2 22:04:42 2017 +0100 ---------------------------------------------------------------------- .../rs/security/oauth2/provider/JCacheOAuthDataProvider.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/6fc117a3/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/JCacheOAuthDataProvider.java ---------------------------------------------------------------------- diff --git a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/JCacheOAuthDataProvider.java b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/JCacheOAuthDataProvider.java index f60747c..ebc1689 100644 --- a/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/JCacheOAuthDataProvider.java +++ b/rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/provider/JCacheOAuthDataProvider.java @@ -227,7 +227,7 @@ public class JCacheOAuthDataProvider extends AbstractOAuthDataProvider { Cache.Entry<K, V> entry = it.next(); V token = entry.getValue(); - if (!isExpired(token)) { + if (isExpired(token)) { toRemove.add(entry.getKey()); } else if (isTokenMatched(token, client, sub)) { tokens.add(token); @@ -250,8 +250,7 @@ public class JCacheOAuthDataProvider extends AbstractOAuthDataProvider { JoseJwtConsumer theConsumer = jwtTokenConsumer == null ? new JoseJwtConsumer() : jwtTokenConsumer; ServerAccessToken token = JwtTokenUtils.createAccessTokenFromJwt(theConsumer, jose, this, super.getJwtAccessTokenClaimMap()); - - if (!isExpired(token)) { + if (isExpired(token)) { toRemove.add(entry.getKey()); } else if (isTokenMatched(token, client, sub)) { tokens.add(token);
