Skip to content

Commit

Permalink
Merge pull request feat/security-active
Browse files Browse the repository at this point in the history
add claims to the token
  • Loading branch information
superpollo2 authored Apr 30, 2024
2 parents 75aa0a9 + a4eeea7 commit b331574
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/com/consola/lis/jwt/JwtService.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ private String getToken(Map<String, Object> extraClaims, User user) {
.claims(extraClaims)
.claim("id", user.getId())
.claim("role", user.getRole())
.claim("name", user.getName())
.claim("username", user.getUsername())
.subject(user.getUsername())
.issuedAt(new Date(System.currentTimeMillis()))
.expiration(new Date(System.currentTimeMillis() + 1000 * 60 * 24))
Expand Down

0 comments on commit b331574

Please sign in to comment.