From deef9ad990c3f5902b1556edbf93dabf223ac175 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Mon, 18 May 2020 13:41:35 +0300 Subject: Fix startup exception --- .../java/com/github/scribejava/apis/AppleClientSecretGenerator.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/main/java/com/github/scribejava') diff --git a/src/main/java/com/github/scribejava/apis/AppleClientSecretGenerator.java b/src/main/java/com/github/scribejava/apis/AppleClientSecretGenerator.java index f3406182..be2c30cf 100644 --- a/src/main/java/com/github/scribejava/apis/AppleClientSecretGenerator.java +++ b/src/main/java/com/github/scribejava/apis/AppleClientSecretGenerator.java @@ -45,13 +45,13 @@ public class AppleClientSecretGenerator { private final byte[] pemData; - public AppleClientSecretGenerator(final String subject, final String teamId, final String keyId, final Path keyFile) - throws IOException, NoSuchAlgorithmException, InvalidKeySpecException { + public AppleClientSecretGenerator(final String subject, final String teamId, final String keyId, final byte[] pemData) + throws NoSuchAlgorithmException, InvalidKeySpecException { this.subject = subject; this.keyId = keyId; this.teamId = teamId; - this.pemData = Files.readAllBytes(keyFile); + this.pemData = pemData; String p8encodedData = new String(getPemData(), StandardCharsets.UTF_8) .replace( "-----BEGIN PRIVATE KEY-----\n", "") -- cgit v1.2.3