Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

GoogleApisCredentialSource

Namespace OfficeIMO.GoogleWorkspace.Auth.GoogleApis
Assembly OfficeIMO.GoogleWorkspace.Auth.GoogleApis
Source revision c8404474f9f2 with working tree changes
Implements
IGoogleWorkspaceCredentialSource
Modifiers sealed

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.

Constructors

GoogleApisCredentialSource 6 overloads
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 requiredposition: 0
fallbackTokenLifetime System.TimeSpan? = null optionalposition: 1
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 requiredposition: 0
fallbackTokenLifetime System.TimeSpan? requiredposition: 1
account System.String? requiredposition: 2
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 requiredposition: 0
fallbackTokenLifetime System.TimeSpan? requiredposition: 1
account System.String? requiredposition: 2
credentialBindingResolver OfficeIMO.GoogleWorkspace.GoogleWorkspaceCredentialBindingResolver? requiredposition: 3
public GoogleApisCredentialSource(ITokenAccess credential, TimeSpan? fallbackTokenLifetime = null) #

Creates an adapter around any Google token source, including UserCredential.

Parameters

credential Google.Apis.Auth.OAuth2.ITokenAccess requiredposition: 0
fallbackTokenLifetime System.TimeSpan? = null optionalposition: 1
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 requiredposition: 0
fallbackTokenLifetime System.TimeSpan? requiredposition: 1
account System.String? requiredposition: 2
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 requiredposition: 0
fallbackTokenLifetime System.TimeSpan? requiredposition: 1
account System.String? requiredposition: 2
credentialBindingResolver OfficeIMO.GoogleWorkspace.GoogleWorkspaceCredentialBindingResolver? requiredposition: 3

Methods

public async Task<GoogleWorkspaceAccessToken> AcquireAccessTokenAsync(IEnumerable<String> scopes, CancellationToken cancellationToken = default) #
Returns: Task<GoogleWorkspaceAccessToken>

Acquires an access token and its available scope evidence for the requested operation.

Parameters

scopes System.Collections.Generic.IEnumerable<System.String> requiredposition: 0
OAuth scopes required by the pending operation.
cancellationToken System.Threading.CancellationToken = default optionalposition: 1
Token used to cancel acquisition.

Returns

A task that produces the acquired token and its scope and identity evidence. Callers must verify that the evidence covers their required scopes.