diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/global/security/jwt/JwtAuthenticationFilter.java b/backend/core/src/main/java/site/timecapsulearchive/core/global/security/jwt/JwtAuthenticationFilter.java index 6876ae4ba..b7ec37b05 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/global/security/jwt/JwtAuthenticationFilter.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/global/security/jwt/JwtAuthenticationFilter.java @@ -6,6 +6,7 @@ import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; import lombok.RequiredArgsConstructor; +import org.springframework.http.HttpHeaders; import org.springframework.security.authentication.AuthenticationManager; import org.springframework.security.core.Authentication; import org.springframework.security.core.AuthenticationException; @@ -19,7 +20,6 @@ public class JwtAuthenticationFilter extends OncePerRequestFilter { private static final int PREFIX_LENGTH = 7; - private static final String AUTHORIZATION_HEADER = JwtConstants.TOKEN_TYPE.getValue(); private static final String TOKEN_TYPE = JwtConstants.TOKEN_TYPE.getValue(); private final AuthenticationManager authenticationManager; @@ -52,7 +52,7 @@ protected void doFilterInternal( } private String extractAccessToken(HttpServletRequest request) { - String token = request.getHeader(AUTHORIZATION_HEADER); + String token = request.getHeader(HttpHeaders.AUTHORIZATION); if (isNotValidFormat(token)) { return ""; diff --git a/backend/core/src/main/java/site/timecapsulearchive/core/global/security/jwt/JwtConstants.java b/backend/core/src/main/java/site/timecapsulearchive/core/global/security/jwt/JwtConstants.java index 8f5be576a..e4ec15ad5 100644 --- a/backend/core/src/main/java/site/timecapsulearchive/core/global/security/jwt/JwtConstants.java +++ b/backend/core/src/main/java/site/timecapsulearchive/core/global/security/jwt/JwtConstants.java @@ -7,7 +7,6 @@ @RequiredArgsConstructor public enum JwtConstants { MEMBER_ID("memberId"), - AUTHORIZATION_HEADER("Authorization"), TOKEN_TYPE("Bearer "), MEMBER_INFO_KEY("memberInfoKey");