Skip to content

Commit

Permalink
#5 feat: client_secret -생성 테스트를위한 출력코드 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
xhaktmchl committed Nov 17, 2022
1 parent 71629e4 commit 2f569c8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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("================================");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 2f569c8

Please sign in to comment.