API Reference
Class
StaticAccessTokenCredentialSource
Credential source that always returns the same already-acquired access token.
Inheritance
- Object
- StaticAccessTokenCredentialSource
Constructors
StaticAccessTokenCredentialSource 2 overloads
public StaticAccessTokenCredentialSource(String accessToken, DateTimeOffset? expiresAt = null, IReadOnlyList<String>? scopes = null) #Creates an unverified static token source. This exact overload is retained for binary compatibility.
Parameters
- accessToken System.String
- expiresAt System.DateTimeOffset? = null
- scopes System.Collections.Generic.IReadOnlyList<System.String>? = null
public StaticAccessTokenCredentialSource(String accessToken, DateTimeOffset? expiresAt, IReadOnlyList<String>? scopes, String? account) #Creates an unverified static token source with an informational account label.
Parameters
- accessToken System.String
- expiresAt System.DateTimeOffset?
- scopes System.Collections.Generic.IReadOnlyList<System.String>?
- account System.String?
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?