From 15419fe34b6dd92223eff7c9f64b34f044eb0133 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Wed, 25 Dec 2019 15:47:15 +0300 Subject: Fix tests --- .../java/com/juick/server/configuration/SignInWithAppleConfig.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/main/java/com/juick/server') diff --git a/src/main/java/com/juick/server/configuration/SignInWithAppleConfig.java b/src/main/java/com/juick/server/configuration/SignInWithAppleConfig.java index f736e673..b55ba391 100644 --- a/src/main/java/com/juick/server/configuration/SignInWithAppleConfig.java +++ b/src/main/java/com/juick/server/configuration/SignInWithAppleConfig.java @@ -21,6 +21,7 @@ import com.github.scribejava.apis.AppleClientSecretGenerator; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.core.io.Resource; import java.io.IOException; import java.security.NoSuchAlgorithmException; @@ -34,11 +35,11 @@ public class SignInWithAppleConfig { private String teamId; @Value("${apple_key_id:keyid}") private String keyId; - @Value("${apple_key_path:AuthKey.p8}") - private String keyPath; + @Value("${apple_key_path:classpath:testkey.p8}") + private Resource keyPath; @Bean public AppleClientSecretGenerator clientSecretGenerator() throws IOException, InvalidKeySpecException, NoSuchAlgorithmException { - return new AppleClientSecretGenerator(appId, teamId, keyId, keyPath); + return new AppleClientSecretGenerator(appId, teamId, keyId, keyPath.getInputStream()); } } -- cgit v1.2.3