You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2018/11/30 14:58:14 UTC
[cxf] 01/02: CXF-7913 - Fixing another NPE with JCache
This is an automated email from the ASF dual-hosted git repository.
coheigea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/cxf.git
commit a7b9dca144ca76f4ad62a05310cc298447aa2572
Author: Colm O hEigeartaigh <co...@apache.org>
AuthorDate: Fri Nov 30 12:29:32 2018 +0000
CXF-7913 - Fixing another NPE with JCache
---
.../cxf/rs/security/oauth2/provider/JCacheOAuthDataProvider.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
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 0b006b5..a583e70 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
@@ -186,7 +186,9 @@ public class JCacheOAuthDataProvider extends AbstractOAuthDataProvider {
@Override
protected void linkRefreshTokenToAccessToken(RefreshToken rt, ServerAccessToken at) {
super.linkRefreshTokenToAccessToken(rt, at);
- accessTokenCache.replace(at.getTokenKey(), at);
+ if (!isStoreJwtTokenKeyOnly()) {
+ accessTokenCache.replace(at.getTokenKey(), at);
+ }
}
@Override