Skip to content

Commit

Permalink
🚑 hotfix: 인증 필터 예외처리 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
jun02160 committed Jan 9, 2024
1 parent 9aacf26 commit 5f56038
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ public class JwtAuthenticationFilter extends OncePerRequestFilter {
protected void doFilterInternal(@NonNull HttpServletRequest request,
@NonNull HttpServletResponse response,
@NonNull FilterChain filterChain) throws ServletException, IOException {

final String token = getJwtFromRequest(request);
jwtTokenProvider.validateToken(token);
try {
final String token = getJwtFromRequest(request);
jwtTokenProvider.validateToken(token);

Long memberId = Long.parseLong(jwtTokenProvider.getPayload(token));
// authentication 객체 생성 -> principal에 유저정보를 담는다.
UserAuthentication authentication = new UserAuthentication(memberId.toString(), null, null);
Expand Down

0 comments on commit 5f56038

Please sign in to comment.