From 396b059866bfbb0cfeecc6211401136b03a2f33c Mon Sep 17 00:00:00 2001 From: ta2ye0n Date: Thu, 10 Oct 2024 00:17:24 +0900 Subject: [PATCH] add :: JwtProperties --- .../v3/global/security/jwt/JwtProperties.java | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/main/java/com/gcms/v3/global/security/jwt/JwtProperties.java diff --git a/src/main/java/com/gcms/v3/global/security/jwt/JwtProperties.java b/src/main/java/com/gcms/v3/global/security/jwt/JwtProperties.java new file mode 100644 index 0000000..1209f93 --- /dev/null +++ b/src/main/java/com/gcms/v3/global/security/jwt/JwtProperties.java @@ -0,0 +1,25 @@ +package com.gcms.v3.global.security.jwt; + +import lombok.Getter; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Component; + +@Getter +@Component +public class JwtProperties { + @Value("${jwt.secret.access-token}") + private String accessTokenKey; + + @Value("${jwt.secret.refresh-token}") + private String refreshTokenKey; + + public static final String AUTHORITIES = "auth"; + + public static final String GRANT_TYPE = "Bearer"; + + public static final String TOKEN_PREFIX = "Bearer "; + + public static final long ACCESS_TOKEN_TIME = 1000 * 60 * 30L; + + public static final long REFRESH_TOKEN_TIME = 1000L * 60 * 60 * 24 * 7; +}