Repository: cxf Updated Branches: refs/heads/master 7e774e3c4 -> b1dae426b
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/b1dae426 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/b1dae426 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/b1dae426 Branch: refs/heads/master Commit: b1dae426bbc0209f762a2714e809b50e2d043cf2 Parents: 7e774e3 Author: Sergey Beryozkin <[email protected]> Authored: Fri Jun 2 17:26:08 2017 +0100 Committer: Sergey Beryozkin <[email protected]> Committed: Fri Jun 2 17:26:08 2017 +0100 ---------------------------------------------------------------------- .../cxf/rs/security/oauth2/provider/JCacheOAuthDataProvider.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/b1dae426/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 a5addd2..0ace50c 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); @@ -251,7 +251,7 @@ public class JCacheOAuthDataProvider extends AbstractOAuthDataProvider { 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);
