4.10.0 (latest) 4.8.0 4.4.0 4.3.1 4.2.0 4.0.0 3.2.0

    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](https://learn.microsoft.com/dotnet/api/system.object) \> ScopedCredentialProvider

## Inherited Members

[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)) [object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Api.Gax.Rest](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Rest.md.txt)

## 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)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Rest.ScopedCredentialProvider.md.txt#Google_Api_Gax_Rest_ScopedCredentialProvider__ctor_System_Collections_Generic_IEnumerable_System_String__System_Boolean_)
with a second argument of `false`.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `scopes` | `IEnumerablestring` 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** ||
|---|---|
| **Name** | **Description** |
| `scopes` | `IEnumerablestring` The scopes to apply. Must not be null, and must not contain null references. May be empty. |
| `useJwtWithScopes` | `bool` A flag preferring use of self-signed JWTs over OAuth tokens when OAuth scopes are explicitly set. |