mirror of
https://github.com/google/nomulus.git
synced 2025-05-15 00:47:11 +02: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:
parent
5c1d9bd5c3
commit
dbb1f1649d
4 changed files with 31 additions and 10 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue