Skip to content

Commit

Permalink
Merge pull request #70 from 1223v/test
Browse files Browse the repository at this point in the history
Fix: JWT 인증 방식 헤더로 변경
  • Loading branch information
1223v authored Mar 8, 2024
2 parents a7d6809 + 8dce445 commit ffce8b7
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,15 @@ 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 ffce8b7

Please sign in to comment.