jwt 수정중

This commit is contained in:
2025-12-04 12:26:18 +09:00
parent 899f86d4a1
commit 18fcc2361e
15 changed files with 128 additions and 73 deletions

View File

@@ -39,6 +39,15 @@ public class JwtAuthenticationFilter extends OncePerRequestFilter {
filterChain.doFilter(request, response);
}
@Override
protected boolean shouldNotFilter(HttpServletRequest request) throws ServletException {
String path = request.getServletPath();
// 여기에 JWT 필터를 타지 않게 할 URL 패턴들 작성
return path.startsWith("/api/auth/signin") || path.startsWith("/api/auth/refresh");
// 필요하면 "/api/auth/logout" 도 추가
}
private String resolveToken(HttpServletRequest request) {
String bearer = request.getHeader("Authorization");
if (bearer != null && bearer.startsWith("Bearer ")) {