Skip to content

Commit

Permalink
[refac] move location of validation logic
Browse files Browse the repository at this point in the history
  • Loading branch information
kgy1008 committed Jan 17, 2025
1 parent 15800b4 commit 73df7e8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,11 @@ public class AppleOAuthProvider implements OAuthProvider {

@Override
public SocialInfoResponse getUserInfo(final String identityToken, final String name) {
validateNullName(name);
Map<String, String> headers = appleIdentityTokenParser.parseHeaders(identityToken);
ApplePublicKeys applePublicKeys = appleFeignClient.getApplePublicKey();
PublicKey applePublicKey = applePublicKeyGenerator.generatePublicKey(headers, applePublicKeys);
Claims claims = appleIdentityTokenParser.parsePublicKeyAndGetClaims(identityToken, applePublicKey);
validateNullName(name);
return SocialInfoResponse.of(
claims.get("sub").toString(),
name,
Expand Down

0 comments on commit 73df7e8

Please sign in to comment.