Skip to content

Commit

Permalink
feat: JwtService Token 헤더 설정 시 Bearer 추가 (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyeong-hyeok committed Aug 9, 2023
1 parent 6336bbe commit 70a9561
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/main/java/com/project/mapdagu/jwt/service/JwtService.java
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public Optional<String> extractEmail(String token) {
.getClaim(EMAIL_CLAIM)
.asString());
} catch (Exception e) {
log.error("액세스 토큰이 유효하지 않습니다.");
log.error("토큰이 유효하지 않습니다.");
return Optional.empty();
}
}
Expand All @@ -137,14 +137,14 @@ public Optional<String> extractEmail(String token) {
* AccessToken 헤더 설정
*/
public void setAccessTokenHeader(HttpServletResponse response, String accessToken) {
response.setHeader(accessHeader, accessToken);
response.setHeader(accessHeader, "Bearer " + accessToken);
}

/**
* RefreshToken 헤더 설정
*/
public void setRefreshTokenHeader(HttpServletResponse response, String refreshToken) {
response.setHeader(refreshHeader, refreshToken);
response.setHeader(refreshHeader, "Bearer " + refreshToken);
}

/**
Expand Down

0 comments on commit 70a9561

Please sign in to comment.