diff --git a/server/src/main/java/com/yogit/server/applelogin/controller/AppleController.java b/server/src/main/java/com/yogit/server/applelogin/controller/AppleController.java index 9f3c7e8..2d58fc3 100644 --- a/server/src/main/java/com/yogit/server/applelogin/controller/AppleController.java +++ b/server/src/main/java/com/yogit/server/applelogin/controller/AppleController.java @@ -73,7 +73,7 @@ public TokenResponse servicesRedirect(@RequestBody ServicesResponse serviceRespo System.out.println("state 값은 : "+serviceResponse.getState()); System.out.println("user 값은: " + serviceResponse.getUser()); - System.out.println("id_token ‣ " + serviceResponse.getId_token()); + System.out.println("id_token: " + serviceResponse.getId_token()); if (serviceResponse == null) { return null; } @@ -91,8 +91,8 @@ public TokenResponse servicesRedirect(@RequestBody ServicesResponse serviceRespo System.out.println("================================"); System.out.println("state 값은 : "+serviceResponse.getState()); System.out.println("user 값은: " + serviceResponse.getUser()); - System.out.println("id_token ‣ " + serviceResponse.getId_token()); - System.out.println("payload ‣ " + appleService.getPayload(serviceResponse.getId_token())); + System.out.println("id_token : " + serviceResponse.getId_token()); + System.out.println("payload : " + appleService.getPayload(serviceResponse.getId_token())); System.out.println("client_secret ‣ " + client_secret); System.out.println("================================"); diff --git a/server/src/main/java/com/yogit/server/applelogin/util/AppleUtils.java b/server/src/main/java/com/yogit/server/applelogin/util/AppleUtils.java index 49b9692..e9f3ec3 100644 --- a/server/src/main/java/com/yogit/server/applelogin/util/AppleUtils.java +++ b/server/src/main/java/com/yogit/server/applelogin/util/AppleUtils.java @@ -78,16 +78,19 @@ public boolean verifyIdentityToken(String id_token) { // EXP 만료시간 검증 Date currentTime = new Date(System.currentTimeMillis()); if (!currentTime.before(payload.getExpirationTime())) { + System.out.println("만료시간 검증 에러"); return false; } // NONCE(Test value), ISS, AUD if (!"20B20D-0S8-1K8".equals(payload.getClaim("nonce")) || !ISS.equals(payload.getIssuer()) || !AUD.equals(payload.getAudience().get(0))) { + System.out.println("NONCE(Test value), ISS, AUD에러"); return false; } // RSA if (verifyPublicKey(signedJWT)) { + System.out.println("client_secret 생성 완료"); return true; } } catch (ParseException e) {