Skip to content

Commit

Permalink
feat: 임시로그
Browse files Browse the repository at this point in the history
  • Loading branch information
jimin3263 committed Aug 27, 2024
1 parent bca9fa3 commit 4f5a651
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import com.pokit.common.exception.ClientValidationException
import com.pokit.token.exception.AuthErrorCode
import com.pokit.token.model.AuthPlatform
import com.pokit.user.dto.UserInfo
import io.github.oshai.kotlinlogging.KotlinLogging
import org.apache.http.HttpStatus
import org.springframework.stereotype.Component

Expand All @@ -22,6 +23,8 @@ class AppleApiAdapter(
private val appleFeignClient: AppleFeignClient,
private val appleSecretGenerator: AppleSecretGenerator
) : AppleApiClient {
private val logger = KotlinLogging.logger { }

override fun getUserInfo(idToken: String): UserInfo {
val claims = decodeAndVerifyIdToken(idToken) // id token을 통해 사용자 정보 추출
val email = claims["email"] as String
Expand Down Expand Up @@ -56,6 +59,7 @@ class AppleApiAdapter(
)
val response = appleFeignClient.revoke(request)
if (response.status() != HttpStatus.SC_OK) {
logger.info { "[APPLE RESPONSE] ${response.body()}" }
throw ClientValidationException(AuthErrorCode.FAILED_TO_REVOKE)
}
}
Expand Down

0 comments on commit 4f5a651

Please sign in to comment.