risdenk commented on a change in pull request #178: KNOX-2071 - Configurable
maximum token lifetime for TokenStateService
URL: https://github.com/apache/knox/pull/178#discussion_r343152887
##########
File path:
gateway-spi/src/main/java/org/apache/knox/gateway/services/security/token/TokenStateService.java
##########
@@ -27,22 +27,41 @@
String CONFIG_SERVER_MANAGED = "knox.token.exp.server-managed";
+ /**
+ * @return The default duration (in milliseconds) for which a token's life
will be extended when it is renewed.
+ */
+ long getDefaultRenewInterval();
+
+ /**
+ * @return The default maximum lifetime duration (in milliseconds) of a
token.
+ */
+ long getDefaultMaxLifetimeDuration();
+
/**
* Add state for the specified token.
*
* @param token The token.
* @param issueTime The time the token was issued.
*/
- void addToken(JWTToken token, long issueTime);
-
+ void addToken(JWTToken token, Long issueTime);
Review comment:
Is there a reason that all the `long` primitives were changed to `Long`
objects? I didn't seem an obvious reason why this was necessary. The `long`
primitive should be fine?
----------------------------------------------------------------
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