mirror of
https://github.com/google/nomulus
synced 2026-01-11 08:20:27 +00:00
Provide separate scopes list for delegated credentials
Scope changes in delegated credentials require coordinated external changes, therefore should be separate from those used in the application default credential. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=212488389
This commit is contained in:
@@ -42,7 +42,7 @@ public abstract class CredentialModule {
|
||||
@Provides
|
||||
@Singleton
|
||||
public static GoogleCredential provideDefaultCredential(
|
||||
@Config("credentialOauthScopes") ImmutableList<String> requiredScopes) {
|
||||
@Config("defaultCredentialOauthScopes") ImmutableList<String> requiredScopes) {
|
||||
GoogleCredential credential;
|
||||
try {
|
||||
credential = GoogleCredential.getApplicationDefault();
|
||||
@@ -60,7 +60,7 @@ public abstract class CredentialModule {
|
||||
@Provides
|
||||
@Singleton
|
||||
public static GoogleCredential provideJsonCredential(
|
||||
@Config("credentialOauthScopes") ImmutableList<String> requiredScopes,
|
||||
@Config("defaultCredentialOauthScopes") ImmutableList<String> requiredScopes,
|
||||
@Key("jsonCredential") String jsonCredential) {
|
||||
GoogleCredential credential;
|
||||
try {
|
||||
@@ -89,7 +89,7 @@ public abstract class CredentialModule {
|
||||
@Provides
|
||||
@Singleton
|
||||
public static GoogleCredential provideDelegatedCredential(
|
||||
@Config("credentialOauthScopes") ImmutableList<String> requiredScopes,
|
||||
@Config("delegatedCredentialOauthScopes") ImmutableList<String> requiredScopes,
|
||||
@JsonCredential GoogleCredential googleCredential,
|
||||
@Config("gSuiteAdminAccountEmailAddress") String gSuiteAdminAccountEmailAddress) {
|
||||
return new GoogleCredential.Builder()
|
||||
|
||||
Reference in New Issue
Block a user