Skip to content

Commit

Permalink
Update JwtTokenUtil.java
Browse files Browse the repository at this point in the history
Updated syntax.
  • Loading branch information
nhkhai committed Mar 22, 2024
1 parent e7e3f56 commit f0493eb
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,19 @@ public String resolveToken(HttpServletRequest request) {
public Claims resolveClaims(HttpServletRequest req) {
try {
String token = resolveToken(req);

if (token != null) {
return parseJwtClaims(token);
}

return null;
} catch (ExpiredJwtException ex) {
req.setAttribute("expired", ex.getMessage());

throw ex;
} catch (Exception ex) {
req.setAttribute("invalid", ex.getMessage());

throw ex;
}
}
Expand Down

0 comments on commit f0493eb

Please sign in to comment.