Skip to content

Commit

Permalink
feat: 소셜 로그인 후 헤더로 엑세스 토큰 발급하는 임시 로직 추가 (#161)
Browse files Browse the repository at this point in the history
feat: 임시 헤더 로직 추가
  • Loading branch information
uwoobeat authored Feb 26, 2024
1 parent 048d78c commit 17b42ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ public class SecurityConstant {
public static final String TOKEN_ROLE_NAME = "role";
public static final String GITHUB_NAME_ATTR_KEY = "id";
public static final String ACCESS_TOKEN_HEADER_PREFIX = "Bearer ";
public static final String ACCESS_TOKEN_HEADER_NAME = "Authorization";

private SecurityConstant() {}
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ public void onAuthenticationSuccess(
RefreshTokenDto refreshTokenDto = jwtService.createRefreshToken(oAuth2User.getMemberId());
cookieUtil.addTokenCookies(response, accessTokenDto.tokenValue(), refreshTokenDto.tokenValue());

// 임시로 헤더에 엑세스 토큰 추가
response.addHeader(ACCESS_TOKEN_HEADER_NAME, ACCESS_TOKEN_HEADER_PREFIX + accessTokenDto.tokenValue());

// 랜딩 상태를 파라미터로 추가하여 리다이렉트
// String baseUrl = determineTargetUrl(request, response);
String baseUrl = PROD_CLIENT_URL + "/";
Expand Down

0 comments on commit 17b42ba

Please sign in to comment.