From 9b07bf5ff5e64d643e4c61b6bdeffd799ade0ae9 Mon Sep 17 00:00:00 2001 From: choidongkuen Date: Sat, 13 Jan 2024 04:54:35 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20jwtService=20=EC=BD=94=EB=93=9C=20?= =?UTF-8?q?=EC=9E=AC=EC=A0=95=EB=A0=AC=20(#40)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../net/teumteum/core/security/service/JwtService.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/teumteum/core/security/service/JwtService.java b/src/main/java/net/teumteum/core/security/service/JwtService.java index d82a32c7..ad0ca8fe 100644 --- a/src/main/java/net/teumteum/core/security/service/JwtService.java +++ b/src/main/java/net/teumteum/core/security/service/JwtService.java @@ -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) {