pzampino commented on a change in pull request #260: KNOX-2228 - JWTFilter
should handle unknown token exception from toke…
URL: https://github.com/apache/knox/pull/260#discussion_r377272413
##########
File path:
gateway-provider-security-jwt/src/main/java/org/apache/knox/gateway/provider/federation/jwt/filter/AbstractJWTFilter.java
##########
@@ -170,7 +170,13 @@ protected void configureExpectedParameters(FilterConfig
filterConfig) {
protected boolean tokenIsStillValid(JWT jwtToken) {
Date expires;
if (tokenStateService != null) {
- expires = new
Date(tokenStateService.getTokenExpiration(jwtToken.toString()));
+ long timestamp = 0;
+ try {
+ timestamp = tokenStateService.getTokenExpiration(jwtToken.toString());
+ } catch (Exception e) {
Review comment:
I would rather change the method signatures in a separate commit, so I've
created https://issues.apache.org/jira/browse/KNOX-2230 to address this concern.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services