Skip to content

Commit

Permalink
refactor: (#663) parseToken을 할 때 validate를 내부적으로 하지 않도록 변경 (#664)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeomxon authored Sep 20, 2023
1 parent be0e77c commit 7e158b6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ public Member resolveArgument(
) throws JsonProcessingException {
final String token = webRequest.getHeader(HttpHeaders.AUTHORIZATION);
final String tokenWithoutType = tokenProcessor.resolveToken(token);
tokenProcessor.validateToken(tokenWithoutType);
final TokenPayload tokenPayload = tokenProcessor.parseToken(tokenWithoutType);
return memberService.findById(tokenPayload.memberId());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ public String resolveToken(final String token) {
}

public TokenPayload parseToken(final String token) throws JsonProcessingException {
validateToken(token);
final String[] chunks = token.split(TOKEN_DELIMITER);
final String payload = new String(Decoders.BASE64.decode(chunks[1]));
return objectMapper.readValue(payload, TokenPayload.class);
Expand Down

0 comments on commit 7e158b6

Please sign in to comment.