Skip to content

Commit

Permalink
Fix expire date in new API keys
Browse files Browse the repository at this point in the history
  • Loading branch information
lukfor committed Jun 20, 2023
1 parent 16a1955 commit 2b6aeba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/cloudgene/mapred/core/JWTUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public static ApiToken createApiToken(User user, String secretKey, int lifetime)
playload.put("mail", user.getMail());
playload.put(ATTRIBUTE_API_HASH, hash);
playload.put("api", true);
String token = JWT.generate(playload, secretKey, lifetime);
String token = JWT.generate(playload, secretKey, lifetime * 1000L);

Date expiresOn = new Date(System.currentTimeMillis() + (lifetime * 1000L));

Expand Down

0 comments on commit 2b6aeba

Please sign in to comment.