Skip to content

Commit

Permalink
Fix: JWT 인증 방식 헤더로 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
1223v committed Mar 8, 2024
1 parent f869d4e commit 1a9e32a
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@ public Optional<String> extractRefreshToken(HttpServletRequest request) {
@Override
public Optional<String> extractAccessToken(HttpServletRequest request) {
// "Authorization" 헤더를 확인합니다.
String authorizationHeader = request.getHeader(AUTHORIZATION);
//String authorizationHeader = request.getHeader(AUTHORIZATION);
// "Authorization" 헤더가 존재하면, 헤더에서 토큰을 추출합니다.
if (authorizationHeader != null && !authorizationHeader.isEmpty()) {
return extractToken.extractTokenHeader(request, AUTHORIZATION);
}
//if (authorizationHeader != null && !authorizationHeader.isEmpty()) {
return extractToken.extractTokenHeader(request, AUTHORIZATION);
//}

// "Authorization" 헤더가 존재하지 않으면, 쿠키에서 토큰을 추출합니다.
return extractToken.extractTokenCookie(request, jwtConfig.getAccessTokenName());
//return extractToken.extractTokenCookie(request, jwtConfig.getAccessTokenName());

}

Expand Down

0 comments on commit 1a9e32a

Please sign in to comment.