From fb11a52d576d27d1821009a9652d0bc20087f1e4 Mon Sep 17 00:00:00 2001 From: ChaeAg Date: Sun, 17 Nov 2024 15:31:57 +0900 Subject: [PATCH] =?UTF-8?q?[TEST]=20=EC=95=A0=ED=94=8C=20=EB=A1=9C?= =?UTF-8?q?=EA=B7=B8=EC=9D=B8=20=ED=85=8C=EC=8A=A4=ED=8A=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/CI.yml | 8 +------- .../websoso/WSSServer/oauth2/service/AppleService.java | 4 ++-- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 5fb50ab94..1b992243b 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -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 diff --git a/src/main/java/org/websoso/WSSServer/oauth2/service/AppleService.java b/src/main/java/org/websoso/WSSServer/oauth2/service/AppleService.java index 5a9b61e94..1b85323cc 100644 --- a/src/main/java/org/websoso/WSSServer/oauth2/service/AppleService.java +++ b/src/main/java/org/websoso/WSSServer/oauth2/service/AppleService.java @@ -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; @@ -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) {