Merged
Conversation
- TokenValidator를 제거하고 TokenProvider 중심의 인증 구조로 통일 - isValidToken 메서드를 extractClaims로 대체하여 Claims 반환 기반 검증 방식으로 변경 - 블랙리스트 체크 및 토큰 파싱 로직을 하나의 흐름으로 통합
- Claims 기반으로 사용자 이메일, 타입, 상태 정보를 헤더에 추가 - 필터에서 인증 후 사용자 정보 전달을 위한 ServerWebExchange 변형 지원
f-lab-nolan
reviewed
Apr 17, 2025
| validateStoredRefreshToken(email, refreshToken); | ||
| Token newToken = generateAndStoreToken(email, userPrincipal.getUserType(), userPrincipal.getUserStatus()); | ||
| Token newToken = generateAndStoreToken(email, UserType.valueOf(userType), UserStatus.valueOf(userStatus)); | ||
| return new TokenResponseDto(newToken); |
Collaborator
There was a problem hiding this comment.
return new TokenResponseDto(this.generateAndStoreToken(email, UserType.valueOf(userType), UserStatus.valueOf(userStatus)));
f-lab-nolan
reviewed
Apr 17, 2025
| public Mono<Void> filter(final ServerWebExchange exchange, final GatewayFilterChain chain) { | ||
| final ServerHttpRequest request = exchange.getRequest(); | ||
|
|
||
| if (isWhitelisted(request)) { |
Collaborator
There was a problem hiding this comment.
WhitelistMatcher.isWhitelisted;
f-lab-nolan
reviewed
Apr 17, 2025
| public String resolveToken(final ServerHttpRequest request) { | ||
| final String authHeader = request.getHeaders().getFirst(HttpHeaders.AUTHORIZATION); | ||
| if (authHeader == null || !authHeader.startsWith(BEARER_PREFIX)) { | ||
| return null; |
f-lab-nolan
reviewed
Apr 17, 2025
|
|
||
| public class HttpResponseUtils { | ||
|
|
||
| private static final String JSON_CONTENT_TYPE = "application/json"; |
Collaborator
There was a problem hiding this comment.
private final String JSON_CONTENT_TYPE = "application/json";
Collaborator
There was a problem hiding this comment.
private String JSON_CONTENT_TYPE = "application/json";
f-lab-nolan
reviewed
Apr 17, 2025
| @RequiredArgsConstructor | ||
| public class RedisTokenRepository { | ||
|
|
||
| private static final String BLACKLIST_KEY = "black_list:"; |
Collaborator
There was a problem hiding this comment.
private static final String BLACKLIST_KEY = "black_list:";
private final String BLACKLIST_KEY = "black_list:";
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.