Skip to content

Commit d35bf8d

Browse files
committed
hotfix : interceptor log 추가
1 parent 4640249 commit d35bf8d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/ita/tinybite/domain/chat/service/StompAuthInterceptor.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,17 @@ public Message<?> preSend(@NotNull Message<?> message, @NotNull MessageChannel c
2929

3030
if(StompCommand.CONNECT.equals(accessor.getCommand())) {
3131
String authHeader = accessor.getFirstNativeHeader("Authorization");
32+
log.info("StompAuthInterceptor authHeader: {}", authHeader);
3233

3334
if (authHeader == null || !authHeader.startsWith("Bearer ")) {
3435
throw new IllegalArgumentException("Missing or invalid Authorization header");
3536
}
3637

3738
String token = authHeader.substring(7);
39+
log.info("StompAuthInterceptor preSend token: {}", token);
3840
jwtTokenProvider.validateToken(token);
3941
Long userId = jwtTokenProvider.getUserId(token);
42+
log.info("StompAuthInterceptor preSend userId: {}", userId);
4043
accessor.getSessionAttributes().put("userId", userId);
4144
}
4245
return message;

0 commit comments

Comments
 (0)