API Reference
Class
DelegateGoogleWorkspaceCredentialSource
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>>
- 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>
- OAuth scopes required by the pending operation.
- cancellationToken System.Threading.CancellationToken = default
- 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.
Inherited Methods
public virtual Boolean Equals(Object? obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object?