Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

GoogleWorkspaceAccessToken

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

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.

Accepted by parameters 1

Constructors

GoogleWorkspaceAccessToken 2 overloads
public GoogleWorkspaceAccessToken(String accessToken, DateTimeOffset expiresAt, IReadOnlyList<String>? scopes = null) #

Creates a token without verified account or grant evidence.

Parameters

accessToken System.String requiredposition: 0
expiresAt System.DateTimeOffset requiredposition: 1
scopes System.Collections.Generic.IReadOnlyList<System.String>? = null optionalposition: 2
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 requiredposition: 0
expiresAt System.DateTimeOffset requiredposition: 1
scopes System.Collections.Generic.IReadOnlyList<System.String>? requiredposition: 2
account System.String? requiredposition: 3

Methods

public static GoogleWorkspaceAccessToken FromVerifiedCredential(String accessToken, DateTimeOffset expiresAt, GoogleWorkspaceCredentialBinding credentialBinding) #
Returns: GoogleWorkspaceAccessToken

Creates a token bound to provider-verified account and scope evidence.

Parameters

accessToken System.String requiredposition: 0
expiresAt System.DateTimeOffset requiredposition: 1
credentialBinding OfficeIMO.GoogleWorkspace.GoogleWorkspaceCredentialBinding requiredposition: 2
public Boolean IsExpired(DateTimeOffset now) #
Returns: Boolean

Determines whether the token has expired at the supplied instant.

Parameters

now System.DateTimeOffset requiredposition: 0
Instant to compare with GoogleWorkspaceAccessToken.ExpiresAt.

Returns

true when now is at or after the expiry instant.

Properties

public String AccessToken { get; } #

Gets the OAuth bearer token.

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.