Skip to content

Commit

Permalink
♻️ refactor : feignclient response에 린트 반영
Browse files Browse the repository at this point in the history
  • Loading branch information
hyeonji91 committed Mar 21, 2024
1 parent 0be8605 commit 04028ac
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ public UserResponse.SignUpDto signupApple(UserRequest.AppleSignUpDto req) {
}

private PublicKey getPublicKey(AppleResponse.ApplePublicKeyDto applePublicKey) {
String nStr = applePublicKey.getN(); //RSA public key의 모듈러스 값
String eStr = applePublicKey.getE(); //RSA public key의 지수 값
String nStr = applePublicKey.getModulus(); //RSA public key의 모듈러스 값
String eStr = applePublicKey.getExponent(); //RSA public key의 지수 값

byte[] nBytes = Base64.getUrlDecoder().decode(nStr);
byte[] eBytes = Base64.getUrlDecoder().decode(eStr);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ public static class ApplePublicKeyDto {
private String kid;
private String use;
private String alg;
private String n;
private String e;
@JsonProperty("n")
private String modulus;
@JsonProperty("e")
private String exponent;
}

@Getter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public void unlinkNaver(String accessToken) {
"NAVER"
);

logger.debug("네이버 탈퇴 res : {}, {}", dto.getAccess_token(), dto.getResult());
logger.debug("네이버 탈퇴 res : {}, {}", dto.getAccessToken(), dto.getResult());
}

public void tokenAvailability(String accessToken) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
package com.example.namo2.global.feignclient.naver;

import com.fasterxml.jackson.annotation.JsonProperty;

import lombok.Getter;
import lombok.Setter;

public class NaverResponse {
public NaverResponse() {
throw new IllegalStateException("Utility class.");
}

@Getter
@Setter
public static class UnlinkDto {
private String access_token;
@JsonProperty("access_token")
private String accessToken;
private String result;
}

Expand Down

0 comments on commit 04028ac

Please sign in to comment.