Skip to content

Commit

Permalink
Merge pull request #354 from urinaner/feature/334
Browse files Browse the repository at this point in the history
[BE][FEAT] refreshToken 으로 새로운 token들 발급
  • Loading branch information
urinaner authored Feb 9, 2025
2 parents 62dbf25 + 0ed5fd8 commit cbaccf3
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 cbaccf3

Please sign in to comment.