Skip to content

Commit

Permalink
fix : 멀티스레드 리뷰 공감 Test에 문제 없도록 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
wjdwnsdnjs13 committed Aug 29, 2024
1 parent aed3851 commit 6d05b75
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ protected void doFilterInternal(
}

private boolean checkMethodWhitelist(String requestURI, String requestMethod) {
log.info("requestURI: {}", requestURI);
log.info("requestMethod: {}", requestMethod);
if (Arrays.stream(AUTH_WHITELIST).anyMatch(requestURI::startsWith)) {
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
import org.springframework.boot.context.properties.ConfigurationProperties;

@ConfigurationProperties(prefix = "aws.s3")
public record ObjectStorageProperties(String accessKey, String secretKey, String bucketName) {}
public record ObjectStorageProperties(
String accessKey, String secretKey, String bucketName, String basicProfileImageUrl) {}
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
import org.depromeet.spot.common.exception.oauth.OauthException.InvalidAcessTokenException;
import org.depromeet.spot.domain.member.Member;
import org.depromeet.spot.domain.member.enums.SnsProvider;
import org.depromeet.spot.infrastructure.aws.property.ObjectStorageProperties;
import org.depromeet.spot.infrastructure.jpa.oauth.config.OauthProperties;
import org.depromeet.spot.infrastructure.jpa.oauth.entity.GoogleTokenEntity;
import org.depromeet.spot.infrastructure.jpa.oauth.entity.GoogleUserInfoEntity;
import org.depromeet.spot.infrastructure.jpa.oauth.entity.KakaoTokenEntity;
import org.depromeet.spot.infrastructure.jpa.oauth.entity.KakaoUserInfoEntity;
import org.depromeet.spot.usecase.port.out.oauth.OauthRepository;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatusCode;
import org.springframework.stereotype.Repository;
Expand All @@ -26,12 +26,11 @@
@RequiredArgsConstructor
public class OauthRepositoryImpl implements OauthRepository {

@Value("${aws.s3.basicProfileImageUrl}")
private String BASIC_PROFILE_IMAGE_URL;

private final String BEARER = "Bearer";
private final OauthProperties properties;

private final ObjectStorageProperties objectStorageProperties;

private final String AUTHORIZATION_CODE = "authorization_code";

@Override
Expand Down Expand Up @@ -140,19 +139,21 @@ public String getOauthAccessToken(SnsProvider snsProvider, String authorizationC
@Override
public Member getKakaoRegisterUserInfo(String accessToken, Member member) {
KakaoUserInfoEntity userInfo = getKakaoUserInfo(accessToken);
log.info("basicProfileImage : {}", objectStorageProperties.basicProfileImageUrl());

// 회원가입 시 받은 정보를 바탕으로 member로 변환해서 리턴.
return userInfo.toKakaoDomain(member, BASIC_PROFILE_IMAGE_URL);
return userInfo.toKakaoDomain(member, objectStorageProperties.basicProfileImageUrl());
}

@Override
public Member getOauthRegisterUserInfo(String accessToken, Member member) {
switch (member.getSnsProvider()) {
case KAKAO:
return getKakaoUserInfo(accessToken).toKakaoDomain(member, BASIC_PROFILE_IMAGE_URL);
return getKakaoUserInfo(accessToken)
.toKakaoDomain(member, objectStorageProperties.basicProfileImageUrl());
default:
return getGoogleUserInfo(accessToken)
.toGoogleDomain(member, BASIC_PROFILE_IMAGE_URL);
.toGoogleDomain(member, objectStorageProperties.basicProfileImageUrl());
}
}

Expand Down

0 comments on commit 6d05b75

Please sign in to comment.