Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

DelegateGoogleWorkspaceCredentialSource

Namespace OfficeIMO.GoogleWorkspace
Assembly OfficeIMO.GoogleWorkspace
Source revision 33d062b583cb 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<System.String>, System.Threading.CancellationToken, System.Threading.Tasks.Task<OfficeIMO.GoogleWorkspace.GoogleWorkspaceAccessToken>> requiredposition: 0
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) #
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.