Skip to content

Commit

Permalink
style: 테스트용 로그만 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
wu-seong committed Feb 7, 2024
1 parent c15efd2 commit fe7f578
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.SignatureAlgorithm;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.bouncycastle.asn1.pkcs.PrivateKeyInfo;
import org.bouncycastle.openssl.PEMParser;
import org.bouncycastle.openssl.jcajce.JcaPEMKeyConverter;
Expand All @@ -33,6 +34,7 @@

@Service
@RequiredArgsConstructor
@Slf4j
public class AppleLoginService implements LoginService{
private final AppleAuthClient appleAuthClient;
private final SocialTokenValidator validator;
Expand Down Expand Up @@ -66,6 +68,8 @@ private String createClientSecret() {
jwtHeader.put("alg", "ES256");

try {
log.info("teamId = {}", teamId);
log.info("kid = {}", kid);
return Jwts.builder()
.setHeaderParams(jwtHeader)
.setIssuer(teamId) // 토큰 발행자 = 우리 팀
Expand Down Expand Up @@ -97,7 +101,7 @@ public String getAccessTokenByRfToken(String code) {
}
private PrivateKey getPrivateKey() throws IOException {
String privateKey = new String(Files.readAllBytes(Paths.get(keyPath) ) );

log.info("privateKey = {}", privateKey);
Reader pemReader = new StringReader(privateKey);
PEMParser pemParser = new PEMParser(pemReader);
JcaPEMKeyConverter converter = new JcaPEMKeyConverter();
Expand Down

0 comments on commit fe7f578

Please sign in to comment.