Skip to content

Commit

Permalink
fix: jwt getRole 메서드 문자열 처리 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
yangchef1 committed May 19, 2024
1 parent 1f3bfa8 commit 3180e2a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public String getUsername(String token) {

public String getRole(String token) {

return Jwts.parser().verifyWith(secretKey).build().parseSignedClaims(token).getPayload().get("role", String.class);
return Jwts.parser().verifyWith(secretKey).build().parseSignedClaims(token).getPayload().get("role", String.class).split("_")[1];
}

public Boolean isExpired(String token) {
Expand Down

0 comments on commit 3180e2a

Please sign in to comment.