Skip to content

Commit

Permalink
Merge pull request #25 from dnd-side-project/fix/#24
Browse files Browse the repository at this point in the history
jwt deprecated 된 API 헤더추가부분만 롤백
  • Loading branch information
youngreal authored Aug 27, 2024
2 parents c1bdef0 + fdb79a2 commit ce96c13
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

import io.jsonwebtoken.JwsHeader;
import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.ProtectedHeader;
import io.jsonwebtoken.SignatureAlgorithm;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;

Expand Down Expand Up @@ -49,7 +47,6 @@
public class AppleOAuthService {
private final AppleClient appleClient;
private final AppleProperties appleProperties;
private final ProtectedHeader protectedHeader;

public AppleIdTokenPayload get(String authorizationCode) {
String idToken = appleClient.getIdToken(
Expand All @@ -66,7 +63,7 @@ private String generateClientSecret() {
LocalDateTime expiration = LocalDateTime.now().plusMinutes(5);

return Jwts.builder()
.header().add(protectedHeader.getKeyId(), appleProperties.getKeyId()).and()
.header().add(JwsHeader.KEY_ID, appleProperties.getKeyId()).and()
.issuer(appleProperties.getTeamId())
.audience().add(appleProperties.getAudience()).and()
.subject(appleProperties.getClientId())
Expand Down

0 comments on commit ce96c13

Please sign in to comment.