Skip to content

Commit

Permalink
Merge pull request #197 from JNU-econovation/fix/BE-72
Browse files Browse the repository at this point in the history
[BE-72] fix : 쿠키에 엑세스 토큰만 담기는 오류
  • Loading branch information
LJH098 authored Mar 2, 2024
2 parents 9141436 + f2a1594 commit 37a151d
Show file tree
Hide file tree
Showing 12 changed files with 5 additions and 16 deletions.
Binary file modified server/.gradle/7.6.1/checksums/checksums.lock
Binary file not shown.
Binary file not shown.
Binary file modified server/.gradle/7.6.1/executionHistory/executionHistory.bin
Binary file not shown.
Binary file modified server/.gradle/7.6.1/executionHistory/executionHistory.lock
Binary file not shown.
Binary file modified server/.gradle/7.6.1/fileHashes/fileHashes.bin
Binary file not shown.
Binary file modified server/.gradle/7.6.1/fileHashes/fileHashes.lock
Binary file not shown.
Binary file modified server/.gradle/buildOutputCleanup/buildOutputCleanup.lock
Binary file not shown.
Binary file modified server/.gradle/buildOutputCleanup/outputFiles.bin
Binary file not shown.
Binary file modified server/.gradle/file-system.probe
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ protected void doFilterInternal(

private String resolveToken(HttpServletRequest request) {
// 쿠키방식 지원
Cookie accessTokenCookie = WebUtils.getCookie(request, "ACCESS_TOKEN");
Cookie accessTokenCookie = WebUtils.getCookie(request, "accessToken");
if (accessTokenCookie != null) {
return accessTokenCookie.getValue();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,11 @@ public ResponseEntity<TokenResponse> login(
TokenResponse tokenResponse = userLoginUseCase.execute(loginRequestDto);
response.addHeader(
"Set-Cookie",
new StringBuilder(
SecurityUtils.setCookie(
"ACCESS_TOKEN", tokenResponse.getAccessToken())
.toString())
.append("; ")
.append(
SecurityUtils.setCookie(
"REFRESH_TOKEN", tokenResponse.getRefreshToken()))
SecurityUtils.setCookie("refreshToken", tokenResponse.getRefreshToken())
.toString());
response.addHeader(
"Set-Cookie",
SecurityUtils.setCookie("accessToken", tokenResponse.getAccessToken()).toString());
return new ResponseEntity<>(tokenResponse, HttpStatus.OK);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,8 @@
package com.econovation.recruit.utils.sort.strategy;

import com.econovation.recruitdomain.domains.applicant.domain.MongoAnswer;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.Collections;
import org.aspectj.util.Reflection;
import org.checkerframework.checker.units.qual.A;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;

// @Component
@Qualifier("answerObjectiveSort")
Expand Down

0 comments on commit 37a151d

Please sign in to comment.