C# Class Google.Api.Gax.ScopedCredentialProvider

Simple factory of scoped credentials, which caches a scoped version of the default application credentials to avoid repeated authentication.
Mostra file Open project: googleapis/gax-dotnet

Public Methods

Method Description
GetCredentials ( Google.Apis.Auth.OAuth2.GoogleCredential credentials ) : Google.Apis.Auth.OAuth2.GoogleCredential

Returns credentials with the scopes applied if required.

GetCredentialsAsync ( Google.Apis.Auth.OAuth2.GoogleCredential credentials ) : Task

Asynchronously returns credentials with the scopes applied if required.

ScopedCredentialProvider ( IEnumerable scopes ) : Google.Apis.Auth.OAuth2

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

Private Methods

Method Description
ApplyScopes ( Google.Apis.Auth.OAuth2.GoogleCredential original ) : Google.Apis.Auth.OAuth2.GoogleCredential
CreateDefaultCredentialsUncached ( ) : Task

Method Details

GetCredentials() public method

Returns credentials with the scopes applied if required.
public GetCredentials ( Google.Apis.Auth.OAuth2.GoogleCredential credentials ) : Google.Apis.Auth.OAuth2.GoogleCredential
credentials Google.Apis.Auth.OAuth2.GoogleCredential Existing credentials, if any. This may be null, /// in which case the default application credentials will be used.
return Google.Apis.Auth.OAuth2.GoogleCredential

GetCredentialsAsync() public method

Asynchronously returns credentials with the scopes applied if required.
public GetCredentialsAsync ( Google.Apis.Auth.OAuth2.GoogleCredential credentials ) : Task
credentials Google.Apis.Auth.OAuth2.GoogleCredential Existing credentials, if any. This may be null, /// in which case the default application credentials will be used.
return Task

ScopedCredentialProvider() public method

Creates a channel pool which will apply the specified scopes to the credentials if they require any.
public ScopedCredentialProvider ( IEnumerable scopes ) : Google.Apis.Auth.OAuth2
scopes IEnumerable The scopes to apply. Must not be null, and must not contain null references. May be empty.
return Google.Apis.Auth.OAuth2