diff --git a/be/overflow/src/main/java/com/econovation/overflow/auth/domain/service/CreateTokenService.java b/be/overflow/src/main/java/com/econovation/overflow/auth/domain/service/CreateTokenService.java index 113bae0..fff44c6 100644 --- a/be/overflow/src/main/java/com/econovation/overflow/auth/domain/service/CreateTokenService.java +++ b/be/overflow/src/main/java/com/econovation/overflow/auth/domain/service/CreateTokenService.java @@ -5,8 +5,8 @@ import com.econovation.overflow.auth.persistence.converter.AuthInfoEntityConverter; import com.econovation.overflow.auth.persistence.entity.AuthInfoEntity; import com.econovation.overflow.auth.persistence.repository.AuthInfoRepository; -import com.econovation.overflow.security.token.TokenProvider; -import com.econovation.overflow.security.token.TokenResolver; +import com.econovation.overflow.support.token.TokenProvider; +import com.econovation.overflow.support.token.TokenResolver; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; diff --git a/be/overflow/src/main/java/com/econovation/overflow/auth/domain/usecase/ReissueUseCase.java b/be/overflow/src/main/java/com/econovation/overflow/auth/domain/usecase/ReissueUseCase.java index f02a07f..5c867a9 100644 --- a/be/overflow/src/main/java/com/econovation/overflow/auth/domain/usecase/ReissueUseCase.java +++ b/be/overflow/src/main/java/com/econovation/overflow/auth/domain/usecase/ReissueUseCase.java @@ -5,7 +5,7 @@ import com.econovation.overflow.auth.domain.service.CreateTokenService; import com.econovation.overflow.auth.persistence.entity.AuthInfoEntity; import com.econovation.overflow.auth.persistence.repository.AuthInfoRepository; -import com.econovation.overflow.security.token.TokenResolver; +import com.econovation.overflow.support.token.TokenResolver; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.stereotype.Service; diff --git a/be/overflow/src/main/java/com/econovation/overflow/auth/web/controller/AuthInterceptor.java b/be/overflow/src/main/java/com/econovation/overflow/auth/web/controller/AuthInterceptor.java index e5b9fa3..c81ff96 100644 --- a/be/overflow/src/main/java/com/econovation/overflow/auth/web/controller/AuthInterceptor.java +++ b/be/overflow/src/main/java/com/econovation/overflow/auth/web/controller/AuthInterceptor.java @@ -1,7 +1,7 @@ package com.econovation.overflow.auth.web.controller; import com.econovation.overflow.auth.web.support.AuthorizationExtractor; -import com.econovation.overflow.security.token.TokenValidator; +import com.econovation.overflow.support.token.TokenValidator; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import lombok.RequiredArgsConstructor; diff --git a/be/overflow/src/main/java/com/econovation/overflow/auth/web/support/AuthenticationPrincipalArgumentResolver.java b/be/overflow/src/main/java/com/econovation/overflow/auth/web/support/AuthenticationPrincipalArgumentResolver.java index 1cc1970..0e5a77a 100644 --- a/be/overflow/src/main/java/com/econovation/overflow/auth/web/support/AuthenticationPrincipalArgumentResolver.java +++ b/be/overflow/src/main/java/com/econovation/overflow/auth/web/support/AuthenticationPrincipalArgumentResolver.java @@ -1,6 +1,6 @@ package com.econovation.overflow.auth.web.support; -import com.econovation.overflow.security.token.TokenResolver; +import com.econovation.overflow.support.token.TokenResolver; import java.util.Objects; import javax.servlet.http.HttpServletRequest; import lombok.RequiredArgsConstructor; diff --git a/be/overflow/src/main/java/com/econovation/overflow/config/WebMvcConfig.java b/be/overflow/src/main/java/com/econovation/overflow/config/WebMvcConfig.java index 639eb9c..382238e 100644 --- a/be/overflow/src/main/java/com/econovation/overflow/config/WebMvcConfig.java +++ b/be/overflow/src/main/java/com/econovation/overflow/config/WebMvcConfig.java @@ -2,7 +2,7 @@ import com.econovation.overflow.auth.web.controller.AuthInterceptor; import com.econovation.overflow.auth.web.support.AuthenticationPrincipalArgumentResolver; -import com.econovation.overflow.security.token.TokenResolver; +import com.econovation.overflow.support.token.TokenResolver; import java.util.List; import lombok.RequiredArgsConstructor; import org.springframework.context.annotation.Bean; diff --git a/be/overflow/src/main/java/com/econovation/overflow/security/exception/NotValidToken.java b/be/overflow/src/main/java/com/econovation/overflow/support/token/NotValidToken.java similarity index 82% rename from be/overflow/src/main/java/com/econovation/overflow/security/exception/NotValidToken.java rename to be/overflow/src/main/java/com/econovation/overflow/support/token/NotValidToken.java index 05da10b..ae8d059 100644 --- a/be/overflow/src/main/java/com/econovation/overflow/security/exception/NotValidToken.java +++ b/be/overflow/src/main/java/com/econovation/overflow/support/token/NotValidToken.java @@ -1,4 +1,4 @@ -package com.econovation.overflow.security.exception; +package com.econovation.overflow.support.token; import com.econovation.overflow.common.exception.BusinessException; import org.springframework.http.HttpStatus; diff --git a/be/overflow/src/main/java/com/econovation/overflow/security/token/TokenProvider.java b/be/overflow/src/main/java/com/econovation/overflow/support/token/TokenProvider.java similarity index 93% rename from be/overflow/src/main/java/com/econovation/overflow/security/token/TokenProvider.java rename to be/overflow/src/main/java/com/econovation/overflow/support/token/TokenProvider.java index 0639cf4..e98ceb6 100644 --- a/be/overflow/src/main/java/com/econovation/overflow/security/token/TokenProvider.java +++ b/be/overflow/src/main/java/com/econovation/overflow/support/token/TokenProvider.java @@ -1,4 +1,4 @@ -package com.econovation.overflow.security.token; +package com.econovation.overflow.support.token; import io.jsonwebtoken.Header; import io.jsonwebtoken.Jwts; @@ -13,7 +13,6 @@ public class TokenProvider { private static final String USER_ID_CLAIM_KEY = "userId"; - private static final String USER_ROLE_CLAIM_KEY = "memberRole"; private final SecretKey secretKey; private final long accessValidTime; diff --git a/be/overflow/src/main/java/com/econovation/overflow/security/token/TokenResolver.java b/be/overflow/src/main/java/com/econovation/overflow/support/token/TokenResolver.java similarity index 91% rename from be/overflow/src/main/java/com/econovation/overflow/security/token/TokenResolver.java rename to be/overflow/src/main/java/com/econovation/overflow/support/token/TokenResolver.java index 94f184f..a142c78 100644 --- a/be/overflow/src/main/java/com/econovation/overflow/security/token/TokenResolver.java +++ b/be/overflow/src/main/java/com/econovation/overflow/support/token/TokenResolver.java @@ -1,6 +1,5 @@ -package com.econovation.overflow.security.token; +package com.econovation.overflow.support.token; -import com.econovation.overflow.security.exception.NotValidToken; import io.jsonwebtoken.Claims; import io.jsonwebtoken.ExpiredJwtException; import io.jsonwebtoken.Jwts; @@ -11,7 +10,6 @@ import javax.crypto.SecretKey; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Component; - @Component public class TokenResolver { diff --git a/be/overflow/src/main/java/com/econovation/overflow/security/token/TokenValidator.java b/be/overflow/src/main/java/com/econovation/overflow/support/token/TokenValidator.java similarity index 91% rename from be/overflow/src/main/java/com/econovation/overflow/security/token/TokenValidator.java rename to be/overflow/src/main/java/com/econovation/overflow/support/token/TokenValidator.java index 44852bc..b5a1e81 100644 --- a/be/overflow/src/main/java/com/econovation/overflow/security/token/TokenValidator.java +++ b/be/overflow/src/main/java/com/econovation/overflow/support/token/TokenValidator.java @@ -1,4 +1,4 @@ -package com.econovation.overflow.security.token; +package com.econovation.overflow.support.token; import com.econovation.overflow.auth.domain.exception.AuthorizationException; import java.util.Date; diff --git a/be/overflow/src/main/resources/application-dev-security.yml b/be/overflow/src/main/resources/application-dev-security.yml index 81d6f7f..668e515 100644 --- a/be/overflow/src/main/resources/application-dev-security.yml +++ b/be/overflow/src/main/resources/application-dev-security.yml @@ -8,7 +8,7 @@ security: token: secretKey: asccesssecretkeyoverflowsecrekey access: - validTime: 1800 + validTime: 1800000 refresh: - validTime : 3600 + validTime: 3600000 diff --git a/be/overflow/src/test/java/com/econovation/overflow/security/token/TokenProviderTest.java b/be/overflow/src/test/java/com/econovation/overflow/support/token/TokenProviderTest.java similarity index 95% rename from be/overflow/src/test/java/com/econovation/overflow/security/token/TokenProviderTest.java rename to be/overflow/src/test/java/com/econovation/overflow/support/token/TokenProviderTest.java index a3a4086..9ef5b37 100644 --- a/be/overflow/src/test/java/com/econovation/overflow/security/token/TokenProviderTest.java +++ b/be/overflow/src/test/java/com/econovation/overflow/support/token/TokenProviderTest.java @@ -1,4 +1,4 @@ -package com.econovation.overflow.security.token; +package com.econovation.overflow.support.token; import static org.assertj.core.api.Assertions.assertThat; diff --git a/be/overflow/src/test/java/com/econovation/overflow/security/token/TokenResolverTest.java b/be/overflow/src/test/java/com/econovation/overflow/support/token/TokenResolverTest.java similarity index 93% rename from be/overflow/src/test/java/com/econovation/overflow/security/token/TokenResolverTest.java rename to be/overflow/src/test/java/com/econovation/overflow/support/token/TokenResolverTest.java index 212f8a5..f74fc13 100644 --- a/be/overflow/src/test/java/com/econovation/overflow/security/token/TokenResolverTest.java +++ b/be/overflow/src/test/java/com/econovation/overflow/support/token/TokenResolverTest.java @@ -1,9 +1,8 @@ -package com.econovation.overflow.security.token; +package com.econovation.overflow.support.token; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatThrownBy; -import com.econovation.overflow.security.exception.NotValidToken; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test;