Skip to content

Commit

Permalink
refactor: jwtService 코드 재정렬 (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
choidongkuen committed Jan 12, 2024
1 parent 6ee62a3 commit 9b07bf5
Showing 1 changed file with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,12 @@ private String createToken(String payload, Long tokenExpiration) {
Claims claims = Jwts.claims().setSubject(payload);
Date tokenExpiresIn = new Date(new Date().getTime() + tokenExpiration);

return Jwts.builder().setClaims(claims).setIssuedAt(new Date()).setExpiration(tokenExpiresIn)
.signWith(SignatureAlgorithm.HS512, jwtProperty.getSecret()).compact();
return Jwts.builder()
.setClaims(claims)
.setIssuedAt(new Date())
.setExpiration(tokenExpiresIn)
.signWith(SignatureAlgorithm.HS512, jwtProperty.getSecret())
.compact();
}

public boolean validateToken(String token) {
Expand Down

0 comments on commit 9b07bf5

Please sign in to comment.