diff options
author | Vitaly Takmazov | 2018-11-23 10:13:31 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-11-23 10:13:31 +0300 |
commit | 54fe7608bb9b6547b25d8a3b23a5eada825037f1 (patch) | |
tree | b06387f5f7aff9555b817b5c92243170d9dac47e /src | |
parent | 77f8d953704eb87b4d6706f30262d1fc178514b1 (diff) |
Read multiple Google client IDs
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/com/juick/server/api/ApiSocialLogin.java | 7 |
1 files changed, 4 insertions, 3 deletions
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<String> 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(); } |