Skip to content

Commit

Permalink
jwt expiry 1 year
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiTgl committed Feb 21, 2024
1 parent 79240cb commit 5b038ea
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public DefaultJWTCallerPrincipal getJwtClaims(String jwt) throws InvalidJwtExcep
* email email of the user from ldap
* preferred_username username of the user from ldap
* groups roles of the user
* exp expiration time of the token (2 days)
* exp expiration time of the token (365 days)
*
* @param user
* @return JWT token
Expand Down Expand Up @@ -71,7 +71,7 @@ public String getToken(User user) {
.claim(Claims.email.name(), user.getEmail())
.claim(Claims.preferred_username.name(), user.getUsername())
.groups(new HashSet<String>(user.getRoles()))
.expiresAt((System.currentTimeMillis() + 172800000L)/1000L)
.expiresAt((System.currentTimeMillis() + 31536000000L)/1000L)
.sign();
return token;
}
Expand Down

0 comments on commit 5b038ea

Please sign in to comment.