Skip to content

Commit

Permalink
[TEST] 애플 로그인 테스트
Browse files Browse the repository at this point in the history
  • Loading branch information
ChaeAg committed Nov 17, 2024
1 parent 86e29d9 commit fb11a52
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 9 deletions.
8 changes: 1 addition & 7 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,9 @@ jobs:
- name: Create apple login key file
env:
API_KEY: ${{ secrets.APPSTORE_API_KEY_ID }}
run: |
mkdir -p src/main/resources/static
echo "${{ secrets.APPLE_AUTH_KEY }}" > src/main/resources/static/AuthKey_$API_KEY.p8
- name: Verify file generation
run: |
mkdir -p src/main/resources/static/apple
echo "${{ secrets.APPLE_AUTH_KEY }}" > src/main/resources/static/apple/AuthKey_${{ secrets.APPSTORE_API_KEY_ID }}.p8
ls -la src/main/resources/static/apple
echo "${{ secrets.APPLE_AUTH_KEY }}" > src/main/resources/static/apple/AuthKey_$API_KEY.p8
- name: Grant execute permission for gradlew
run: chmod +x gradlew
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
import io.jsonwebtoken.JwtException;
import io.jsonwebtoken.Jwts;
import io.jsonwebtoken.UnsupportedJwtException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.security.KeyFactory;
import java.security.NoSuchAlgorithmException;
Expand Down Expand Up @@ -220,7 +220,7 @@ private byte[] readPrivateKey(String keyPath) {
Resource resource = new ClassPathResource(keyPath);
System.out.println("Resource exists: " + resource.exists());
System.out.println("Resource file path: " + resource.getFilename());
try (PemReader pemReader = new PemReader(new InputStreamReader(resource.getInputStream()))) {
try (PemReader pemReader = new PemReader(new FileReader(resource.getFile()))) {
PemObject pemObject = pemReader.readPemObject();
return pemObject.getContent();
} catch (IOException e) {
Expand Down

0 comments on commit fb11a52

Please sign in to comment.