From 54fe7608bb9b6547b25d8a3b23a5eada825037f1 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 23 Nov 2018 10:13:31 +0300 Subject: Read multiple Google client IDs --- src/main/java/com/juick/server/api/ApiSocialLogin.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/main/java/com/juick/server/api') diff --git a/src/main/java/com/juick/server/api/ApiSocialLogin.java b/src/main/java/com/juick/server/api/ApiSocialLogin.java index ff658c09..e46dd5c4 100644 --- a/src/main/java/com/juick/server/api/ApiSocialLogin.java +++ b/src/main/java/com/juick/server/api/ApiSocialLogin.java @@ -55,6 +55,7 @@ import javax.inject.Inject; import java.io.IOException; import java.security.GeneralSecurityException; import java.util.Collections; +import java.util.List; import java.util.UUID; import java.util.concurrent.ExecutionException; @@ -88,8 +89,8 @@ public class ApiSocialLogin { private String VK_SECRET; @Value("${telegram_token:secret}") private String telegramToken; - @Value("${google_client_id:id") - private String googleClientId; + @Value("${google_client_ids:ids") + private List googleClientIds; @Inject private CrosspostService crosspostService; @@ -110,7 +111,7 @@ public class ApiSocialLogin { twitterBuilder = new ServiceBuilder(twitterConsumerKey); vkBuilder = new ServiceBuilder(VK_APPID); verifier = new GoogleIdTokenVerifier.Builder(transport, jsonFactory) - .setAudience(Collections.singletonList(googleClientId)) + .setAudience(googleClientIds) .build(); } -- cgit v1.2.3