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_r343187237
##########
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:
The only concern I had was performance based since `Long` is heavier than
`long`. I don't know how often these apis are called, but if possible primitive
seemed to make more sense when reading through.
----------------------------------------------------------------
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