From 79b1246035c036927181831a29cbb920d19fde0c Mon Sep 17 00:00:00 2001 From: kdomo Date: Fri, 14 Jul 2023 20:00:56 +0900 Subject: [PATCH] =?UTF-8?q?hotfix:=20=EC=9D=B4=EB=A9=94=EC=9D=BC=20?= =?UTF-8?q?=ED=97=88=EC=9A=A9=20=EC=95=88=ED=96=88=EC=9D=84=EB=95=8C=20?= =?UTF-8?q?=EB=B0=9C=EC=83=9D=ED=95=98=EB=8A=94=20=EB=AC=B8=EC=A0=9C=20?= =?UTF-8?q?=ED=95=B4=EA=B2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../whatnow/api/auth/dto/response/OauthUserInfoResponse.kt | 3 +-- .../com/depromeet/whatnow/api/auth/helper/KakaoOauthHelper.kt | 2 +- .../com/depromeet/whatnow/api/auth/helper/OauthUserInfoDto.kt | 1 - .../kotlin/com/depromeet/whatnow/config/jwt/JwtOIDCHelper.kt | 1 - .../com/depromeet/whatnow/config/jwt/OIDCDecodePayload.kt | 1 - .../com/depromeet/whatnow/api/dto/KakaoInformationResponse.kt | 1 - .../kotlin/com/depromeet/whatnow/api/KakaoInfoClientTest.kt | 1 - 7 files changed, 2 insertions(+), 8 deletions(-) diff --git a/Whatnow-Api/src/main/kotlin/com/depromeet/whatnow/api/auth/dto/response/OauthUserInfoResponse.kt b/Whatnow-Api/src/main/kotlin/com/depromeet/whatnow/api/auth/dto/response/OauthUserInfoResponse.kt index ef2dd1d1..e8757286 100644 --- a/Whatnow-Api/src/main/kotlin/com/depromeet/whatnow/api/auth/dto/response/OauthUserInfoResponse.kt +++ b/Whatnow-Api/src/main/kotlin/com/depromeet/whatnow/api/auth/dto/response/OauthUserInfoResponse.kt @@ -3,7 +3,6 @@ package com.depromeet.whatnow.api.auth.dto.response import com.depromeet.whatnow.api.auth.helper.OauthUserInfoDto data class OauthUserInfoResponse( - val email: String?, val profileImage: String, val isDefaultImage: Boolean, val nickname: String, @@ -11,7 +10,7 @@ data class OauthUserInfoResponse( companion object { fun from(oauthUserInfoDto: OauthUserInfoDto): OauthUserInfoResponse { - return OauthUserInfoResponse(oauthUserInfoDto.email, oauthUserInfoDto.profileImage, oauthUserInfoDto.isDefaultImage, oauthUserInfoDto.username) + return OauthUserInfoResponse(oauthUserInfoDto.profileImage, oauthUserInfoDto.isDefaultImage, oauthUserInfoDto.username) } } } diff --git a/Whatnow-Api/src/main/kotlin/com/depromeet/whatnow/api/auth/helper/KakaoOauthHelper.kt b/Whatnow-Api/src/main/kotlin/com/depromeet/whatnow/api/auth/helper/KakaoOauthHelper.kt index cc22fcd6..1fd1f2d1 100644 --- a/Whatnow-Api/src/main/kotlin/com/depromeet/whatnow/api/auth/helper/KakaoOauthHelper.kt +++ b/Whatnow-Api/src/main/kotlin/com/depromeet/whatnow/api/auth/helper/KakaoOauthHelper.kt @@ -41,7 +41,7 @@ class KakaoOauthHelper( fun getUserInfo(oauthAccessToken: String): OauthUserInfoDto { val response = kakaoInfoClient.kakaoUserInfo(BEARER + oauthAccessToken) val kakaoAccount: KakaoInformationResponse.KakaoAccount = response.kakaoAccount - return OauthUserInfoDto(response.id, kakaoAccount.profile.profileImageUrl, kakaoAccount.profile.isDefaultImage, kakaoAccount.profile.nickname, kakaoAccount.email, OauthProvider.KAKAO) + return OauthUserInfoDto(response.id, kakaoAccount.profile.profileImageUrl, kakaoAccount.profile.isDefaultImage, kakaoAccount.profile.nickname, OauthProvider.KAKAO) } fun getOIDCDecodePayload(token: String): OIDCDecodePayload { diff --git a/Whatnow-Api/src/main/kotlin/com/depromeet/whatnow/api/auth/helper/OauthUserInfoDto.kt b/Whatnow-Api/src/main/kotlin/com/depromeet/whatnow/api/auth/helper/OauthUserInfoDto.kt index ce2ef54e..fe95e59b 100644 --- a/Whatnow-Api/src/main/kotlin/com/depromeet/whatnow/api/auth/helper/OauthUserInfoDto.kt +++ b/Whatnow-Api/src/main/kotlin/com/depromeet/whatnow/api/auth/helper/OauthUserInfoDto.kt @@ -8,7 +8,6 @@ data class OauthUserInfoDto( val profileImage: String, val isDefaultImage: Boolean, val username: String, - val email: String?, val oauthProvider: OauthProvider, ) { fun toOauthInfo(): OauthInfo { diff --git a/Whatnow-Api/src/main/kotlin/com/depromeet/whatnow/config/jwt/JwtOIDCHelper.kt b/Whatnow-Api/src/main/kotlin/com/depromeet/whatnow/config/jwt/JwtOIDCHelper.kt index ab5ea5d4..231c12a4 100644 --- a/Whatnow-Api/src/main/kotlin/com/depromeet/whatnow/config/jwt/JwtOIDCHelper.kt +++ b/Whatnow-Api/src/main/kotlin/com/depromeet/whatnow/config/jwt/JwtOIDCHelper.kt @@ -52,7 +52,6 @@ class JwtOIDCHelper { body.issuer, body.audience, body.subject, - body["email", String::class.java], ) } diff --git a/Whatnow-Api/src/main/kotlin/com/depromeet/whatnow/config/jwt/OIDCDecodePayload.kt b/Whatnow-Api/src/main/kotlin/com/depromeet/whatnow/config/jwt/OIDCDecodePayload.kt index be9027f3..921c0ea9 100644 --- a/Whatnow-Api/src/main/kotlin/com/depromeet/whatnow/config/jwt/OIDCDecodePayload.kt +++ b/Whatnow-Api/src/main/kotlin/com/depromeet/whatnow/config/jwt/OIDCDecodePayload.kt @@ -11,5 +11,4 @@ data class OIDCDecodePayload( /** oauth provider account unique id */ val sub: String, - val email: String, ) diff --git a/Whatnow-Infrastructure/src/main/kotlin/com/depromeet/whatnow/api/dto/KakaoInformationResponse.kt b/Whatnow-Infrastructure/src/main/kotlin/com/depromeet/whatnow/api/dto/KakaoInformationResponse.kt index 804c8850..953bf69d 100644 --- a/Whatnow-Infrastructure/src/main/kotlin/com/depromeet/whatnow/api/dto/KakaoInformationResponse.kt +++ b/Whatnow-Infrastructure/src/main/kotlin/com/depromeet/whatnow/api/dto/KakaoInformationResponse.kt @@ -18,7 +18,6 @@ data class KakaoInformationResponse( @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy::class) data class KakaoAccount( val profile: Profile, - val email: String?, ) { @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy::class) diff --git a/Whatnow-Infrastructure/src/test/kotlin/com/depromeet/whatnow/api/KakaoInfoClientTest.kt b/Whatnow-Infrastructure/src/test/kotlin/com/depromeet/whatnow/api/KakaoInfoClientTest.kt index 4cdc8022..26897f18 100644 --- a/Whatnow-Infrastructure/src/test/kotlin/com/depromeet/whatnow/api/KakaoInfoClientTest.kt +++ b/Whatnow-Infrastructure/src/test/kotlin/com/depromeet/whatnow/api/KakaoInfoClientTest.kt @@ -40,7 +40,6 @@ class KakaoInfoClientTest { ), ) var response = kakaoInfoClient.kakaoUserInfo("accessToken") - assertEquals(response.kakaoAccount.email, "sample@sample.com") assertEquals(response.kakaoAccount.profile.profileImageUrl, "http://yyy.kakao.com/dn/.../img_640x640.jpg") assertEquals(response.kakaoAccount.profile.isDefaultImage, false) }