GoogleApisCredentialSource
OfficeIMO.GoogleWorkspace.Auth.GoogleApis
Adapts credentials from Google.Apis.Auth to the dependency-light OfficeIMO credential contract.
Inheritance
- object
- GoogleApisCredentialSource
Usage
Explore 1 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 1
Constructors
public GoogleApisCredentialSource(GoogleCredential credential, TimeSpan? fallbackTokenLifetime = null) #Creates an adapter around a Google credential, applying requested scopes when the credential requires scoping.
Parameters
- credential Google.Apis.Auth.OAuth2.GoogleCredential
- fallbackTokenLifetime System.TimeSpan? = null
public GoogleApisCredentialSource(GoogleCredential credential, TimeSpan? fallbackTokenLifetime, string? account) #Creates an adapter with an informational account label that is not credential evidence.
Parameters
- credential Google.Apis.Auth.OAuth2.GoogleCredential
- fallbackTokenLifetime System.TimeSpan?
- account string?
public GoogleApisCredentialSource(GoogleCredential credential, TimeSpan? fallbackTokenLifetime, string? account, GoogleWorkspaceCredentialBindingResolver? credentialBindingResolver) #Creates an adapter that verifies account and grants through a provider-evidence resolver.
Parameters
- credential Google.Apis.Auth.OAuth2.GoogleCredential
- fallbackTokenLifetime System.TimeSpan?
- account string?
- credentialBindingResolver OfficeIMO.GoogleWorkspace.GoogleWorkspaceCredentialBindingResolver?
public GoogleApisCredentialSource(ITokenAccess credential, TimeSpan? fallbackTokenLifetime = null) #Creates an adapter around any Google token source, including UserCredential.
Parameters
- credential Google.Apis.Auth.OAuth2.ITokenAccess
- fallbackTokenLifetime System.TimeSpan? = null
public GoogleApisCredentialSource(ITokenAccess credential, TimeSpan? fallbackTokenLifetime, string? account) #Creates an adapter with an informational account label that is not credential evidence.
Parameters
- credential Google.Apis.Auth.OAuth2.ITokenAccess
- fallbackTokenLifetime System.TimeSpan?
- account string?
public GoogleApisCredentialSource(ITokenAccess credential, TimeSpan? fallbackTokenLifetime, string? account, GoogleWorkspaceCredentialBindingResolver? credentialBindingResolver) #Creates an adapter that verifies account and grants through a provider-evidence resolver.
Parameters
- credential Google.Apis.Auth.OAuth2.ITokenAccess
- fallbackTokenLifetime System.TimeSpan?
- account string?
- credentialBindingResolver OfficeIMO.GoogleWorkspace.GoogleWorkspaceCredentialBindingResolver?
Methods
public async Task<GoogleWorkspaceAccessToken> AcquireAccessTokenAsync(IEnumerable<string> scopes, CancellationToken cancellationToken = default) #Acquires an access token and its available scope evidence for the requested operation.
Parameters
- scopes System.Collections.Generic.IEnumerable<string>
- OAuth scopes required by the pending operation.
- cancellationToken System.Threading.CancellationToken = default
- Token used to cancel acquisition.
Returns
Task<GoogleWorkspaceAccessToken> A task that produces the acquired token and its scope and identity evidence. Callers must verify that the evidence covers their required scopes.