From 09d2860c12e4958fb002706aceb936ae2d0f1656 Mon Sep 17 00:00:00 2001 From: BYEONGRYEOL Date: Sat, 13 Jul 2024 20:03:16 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20#26=20log=20=20=ED=99=95=EC=9D=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../apple/service/AppleClaimsValidator.java | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/genti-external/src/main/java/com/gt/genti/openfeign/apple/service/AppleClaimsValidator.java b/genti-external/src/main/java/com/gt/genti/openfeign/apple/service/AppleClaimsValidator.java index dc02257e..2eae3a2a 100644 --- a/genti-external/src/main/java/com/gt/genti/openfeign/apple/service/AppleClaimsValidator.java +++ b/genti-external/src/main/java/com/gt/genti/openfeign/apple/service/AppleClaimsValidator.java @@ -17,7 +17,7 @@ @Component public class AppleClaimsValidator { - private static final String NONCE_KEY = "nonce"; + private static final String NONCE_KEY = "c_hash"; private final String iss = "https://appleid.apple.com"; private final String clientId; private final String nonce; @@ -32,12 +32,16 @@ public AppleClaimsValidator( public boolean isValid(Claims claims) { log.info(claims.toString()); - log.info(claims.getAudience() == null ? "claims.getAudience() is null " : "getAudience 무넺없음"); - log.info(claims.getIssuer() == null ? "claims.getIssuer() is null " : "getIssuer 무넺없음"); - log.info("iss : " + iss); - // if(claims.getIssuer().contains(iss)){ - // log.info("iss 가 같지않음"); - // } + log.info("애플에서 받은 iss : " + claims.getIssuer()); + log.info("genti iss : " + iss); + log.info("애플에서 받은 clientid : " + claims.getAudience()); + log.info("genti clientid : " + clientId); + log.info("애플에서 받은 암호화된 nonce : " + claims.get(NONCE_KEY)); + log.info("genti 암호화 nonce : " + this.nonce); + + if(claims.getIssuer().contains(iss)){ + log.info("iss 가 같지않음"); + } if(claims.getAudience().equals(clientId)){ log.info("clientid 가 같지않음"); }