mirror of
https://github.com/google/nomulus.git
synced 2025-05-13 16:07:15 +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
|
@ -1143,12 +1143,22 @@ public final class RegistryConfig {
|
|||
return ImmutableSet.copyOf(config.oAuth.allowedOauthClientIds);
|
||||
}
|
||||
|
||||
/** Provides the OAuth scopes required for accessing Google APIs. */
|
||||
/**
|
||||
* Provides the OAuth scopes required for accessing Google APIs using the default credential.
|
||||
*/
|
||||
@Provides
|
||||
@Config("credentialOauthScopes")
|
||||
public static ImmutableList<String> provideCredentialOauthScopes(
|
||||
@Config("defaultCredentialOauthScopes")
|
||||
public static ImmutableList<String> provideServiceAccountCredentialOauthScopes(
|
||||
RegistryConfigSettings config) {
|
||||
return ImmutableList.copyOf(config.credentialOAuth.credentialOauthScopes);
|
||||
return ImmutableList.copyOf(config.credentialOAuth.defaultCredentialOauthScopes);
|
||||
}
|
||||
|
||||
/** Provides the OAuth scopes required for delegated admin access to G Suite domain. */
|
||||
@Provides
|
||||
@Config("delegatedCredentialOauthScopes")
|
||||
public static ImmutableList<String> provideDelegatedCredentialOauthScopes(
|
||||
RegistryConfigSettings config) {
|
||||
return ImmutableList.copyOf(config.credentialOAuth.delegatedCredentialOauthScopes);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue