Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

DelegateGoogleWorkspaceCredentialSource

OfficeIMO.GoogleWorkspace

Namespace
OfficeIMO.GoogleWorkspace
Assembly
OfficeIMO.GoogleWorkspace
Source revision
be6c300e4ab1 with working tree changes
Modifiers
sealed

Credential source that delegates token acquisition to application-provided code.

Inheritance

  • object
  • DelegateGoogleWorkspaceCredentialSource

Constructors

public DelegateGoogleWorkspaceCredentialSource(Func<IReadOnlyList<string>, CancellationToken, Task<GoogleWorkspaceAccessToken>> acquireAccessToken) #

Creates a credential source backed by the supplied asynchronous token-acquisition delegate.

Parameters

acquireAccessToken System.Func<System.Collections.Generic.IReadOnlyList<string>, System.Threading.CancellationToken, System.Threading.Tasks.Task<OfficeIMO.GoogleWorkspace.GoogleWorkspaceAccessToken>> required
Delegate that receives the requested scopes materialized in enumeration order and the cancellation token.

Exceptions

  • ArgumentNullException – acquireAccessToken is null.

Methods

public 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> required
OAuth scopes required by the pending operation.
cancellationToken System.Threading.CancellationToken = default optional
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.