토큰 생성 로그 추가 #152
@@ -8,11 +8,13 @@ import jakarta.annotation.PostConstruct;
|
|||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import javax.crypto.SecretKey;
|
import javax.crypto.SecretKey;
|
||||||
|
import lombok.extern.log4j.Log4j2;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
/** 토큰 생성 */
|
/** 토큰 생성 */
|
||||||
@Component
|
@Component
|
||||||
|
@Log4j2
|
||||||
public class JwtTokenProvider {
|
public class JwtTokenProvider {
|
||||||
|
|
||||||
@Value("${jwt.secret}")
|
@Value("${jwt.secret}")
|
||||||
@@ -34,11 +36,13 @@ public class JwtTokenProvider {
|
|||||||
|
|
||||||
// Access Token 생성
|
// Access Token 생성
|
||||||
public String createAccessToken(String subject) {
|
public String createAccessToken(String subject) {
|
||||||
|
log.info("TOKEN VALIDITY = {}", accessTokenValidityInMs);
|
||||||
return createToken(subject, accessTokenValidityInMs);
|
return createToken(subject, accessTokenValidityInMs);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Refresh Token 생성
|
// Refresh Token 생성
|
||||||
public String createRefreshToken(String subject) {
|
public String createRefreshToken(String subject) {
|
||||||
|
log.info("REFRESH TOKEN VALIDITY = {}", refreshTokenValidityInMs);
|
||||||
return createToken(subject, refreshTokenValidityInMs);
|
return createToken(subject, refreshTokenValidityInMs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user