reta commented on code in PR #3382:
URL: https://github.com/apache/cxf/pull/3382#discussion_r3824137031
##########
rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AbstractAccessTokenValidator.java:
##########
@@ -105,8 +116,16 @@ protected AccessTokenValidation
getAccessTokenValidation(String authScheme, Stri
}
AccessTokenValidation accessTokenV = null;
+ AccessTokenValidationCacheEntry cacheEntry = null;
if (maxValidationDataCacheSize > 0) {
- accessTokenV = accessTokenValidations.get(authSchemeData);
+ cacheEntry = accessTokenValidations.get(authSchemeData);
+ if (cacheEntry != null) {
+ if (isValidationDataCacheEntryExpired(cacheEntry)) {
Review Comment:
Do we concerned about the race here: new token gets added, replacing the
existing one, while we are checking the expiration?
##########
rt/rs/security/oauth-parent/oauth2/src/main/java/org/apache/cxf/rs/security/oauth2/services/AbstractAccessTokenValidator.java:
##########
@@ -105,8 +116,16 @@ protected AccessTokenValidation
getAccessTokenValidation(String authScheme, Stri
}
AccessTokenValidation accessTokenV = null;
+ AccessTokenValidationCacheEntry cacheEntry = null;
if (maxValidationDataCacheSize > 0) {
- accessTokenV = accessTokenValidations.get(authSchemeData);
+ cacheEntry = accessTokenValidations.get(authSchemeData);
+ if (cacheEntry != null) {
+ if (isValidationDataCacheEntryExpired(cacheEntry)) {
Review Comment:
Are we concerned about the race here: new token gets added, replacing the
existing one, while we are checking the expiration?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]