Skip to content

Commit

Permalink
feat: refreshToken 으로 새로운 token들 발급
Browse files Browse the repository at this point in the history
  • Loading branch information
2Jin1031 committed Feb 9, 2025
1 parent 70330b4 commit 0ed5fd8
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions backend/src/main/java/org/example/backend/jwt/JWTFilter.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ public class JWTFilter extends OncePerRequestFilter {
private final JWTUtil jwtUtil;
private final JwtBlacklistService jwtBlacklistService;

private static final List<String> REFRESH_TOKEN_PATHS = List.of(
"/api/specific-path",
"/api/another-path"
);
private static final String REFRESH_TOKEN_PATH = "/api/refresh";

public JWTFilter(JWTUtil jwtUtil, JwtBlacklistService jwtBlacklistService) {
this.jwtUtil = jwtUtil;
Expand Down Expand Up @@ -169,6 +166,6 @@ private String extractRefreshTokenFromBody(HttpServletRequest request) {
}

private boolean isRefreshTokenPath(String requestURI) {
return REFRESH_TOKEN_PATHS.stream().anyMatch(path -> new AntPathMatcher().match(path, requestURI));
return new AntPathMatcher().match(REFRESH_TOKEN_PATH, requestURI);
}
}

0 comments on commit 0ed5fd8

Please sign in to comment.