Skip to content

Commit 9672171

Browse files
committed
fix: shouldNotFilter 수정
- 토큰이 없으면 SCH에 AUTH를 설정하지 않고 스킵.
1 parent d9661c5 commit 9672171

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/main/java/com/somemore/auth/jwt/filter/JwtAuthFilter.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ public class JwtAuthFilter extends OncePerRequestFilter {
3434

3535
@Override
3636
protected boolean shouldNotFilter(HttpServletRequest request) {
37-
EncodedToken accessToken = getAccessToken(request);
38-
String path = request.getRequestURI();
39-
40-
return accessToken == null
41-
|| accessToken.isUninitialized()
42-
|| path.equals("/api/center/sign-in");
37+
try {
38+
EncodedToken accessToken = getAccessToken(request);
39+
return accessToken == null || accessToken.isUninitialized();
40+
} catch (JwtException e) {
41+
return true;
42+
}
4343
}
4444

4545
@Override

0 commit comments

Comments
 (0)