API Reference
GoogleWorkspaceAccessToken
Represents an acquired Google OAuth access token.
Inheritance
- Object
- GoogleWorkspaceAccessToken
Usage
Explore 7 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.
Returned or exposed by 6
- Method DelegateGoogleWorkspaceCredentialSource.AcquireAccessTokenAsync
- Method GoogleServiceAccountCredentialSource.AcquireAccessTokenAsync
- Method GoogleWorkspaceAccessToken.FromVerifiedCredential
- Method GoogleWorkspaceSession.AcquireAccessTokenAsync
- Method IGoogleWorkspaceCredentialSource.AcquireAccessTokenAsync
- Method StaticAccessTokenCredentialSource.AcquireAccessTokenAsync
Accepted by parameters 1
Constructors
public GoogleWorkspaceAccessToken(String accessToken, DateTimeOffset expiresAt, IReadOnlyList<String>? scopes = null) #Creates a token without verified account or grant evidence.
Parameters
- accessToken System.String
- expiresAt System.DateTimeOffset
- scopes System.Collections.Generic.IReadOnlyList<System.String>? = null
public GoogleWorkspaceAccessToken(String accessToken, DateTimeOffset expiresAt, IReadOnlyList<String>? scopes, String? account) #Creates a token with an informational account label. The label is not credential evidence and does not make the token eligible for guarded mutations.
Parameters
- accessToken System.String
- expiresAt System.DateTimeOffset
- scopes System.Collections.Generic.IReadOnlyList<System.String>?
- account System.String?
Methods
public static GoogleWorkspaceAccessToken FromVerifiedCredential(String accessToken, DateTimeOffset expiresAt, GoogleWorkspaceCredentialBinding credentialBinding) #GoogleWorkspaceAccessTokenCreates a token bound to provider-verified account and scope evidence.
Parameters
- accessToken System.String
- expiresAt System.DateTimeOffset
- credentialBinding OfficeIMO.GoogleWorkspace.GoogleWorkspaceCredentialBinding
public Boolean IsExpired(DateTimeOffset now) #BooleanDetermines whether the token has expired at the supplied instant.
Parameters
- now System.DateTimeOffset
- Instant to compare with GoogleWorkspaceAccessToken.ExpiresAt.
Returns
true when now is at or after the expiry instant.
Inherited Methods
public virtual Boolean Equals(Object? obj) #BooleanParameters
- obj Object?
Properties
public DateTimeOffset ExpiresAt { get; } #Gets the instant after which the token must not be used.
public IReadOnlyList<String> Scopes { get; } #Gets the normalized OAuth scopes bound to the token by its source.
public String? Account { get; } #Gets the credential-source account label, when supplied. Use GoogleWorkspaceAccessToken.CredentialBinding for verified evidence.
public GoogleWorkspaceCredentialBinding? CredentialBinding { get; } #Gets provider-verified account and scope evidence, when supplied by the credential source.