Class ScopedCredentialProvider (4.3.1)

public sealed class ScopedCredentialProvider

Simple factory of scoped credentials, which caches a scoped version of the default application credentials to avoid repeated authentication.

Inheritance

object > ScopedCredentialProvider

Namespace

GoogleGoogle.ApiGaxRest

Assembly

Google.Api.Gax.Rest.dll

Constructors

ScopedCredentialProvider(IEnumerable<string>)

public ScopedCredentialProvider(IEnumerable<string> scopes)

Creates a channel pool which will apply the specified scopes to the credentials if they require any. A provider created with this overload is equivalent to calling ScopedCredentialProvider(IEnumerable<string>, bool) with a second argument of false.

Parameter
NameDescription
scopesIEnumerablestring

The scopes to apply. Must not be null, and must not contain null references. May be empty.

ScopedCredentialProvider(IEnumerable<string>, bool)

public ScopedCredentialProvider(IEnumerable<string> scopes, bool useJwtWithScopes)

Creates a channel pool which will apply the specified scopes to the credentials if they require any.

Parameters
NameDescription
scopesIEnumerablestring

The scopes to apply. Must not be null, and must not contain null references. May be empty.

useJwtWithScopesbool

A flag preferring use of self-signed JWTs over OAuth tokens when OAuth scopes are explicitly set.