Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

GoogleWorkspaceAccessToken

OfficeIMO.GoogleWorkspace

Namespace
OfficeIMO.GoogleWorkspace
Assembly
OfficeIMO.GoogleWorkspace
Source revision
be6c300e4ab1 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 string required
expiresAt System.DateTimeOffset required
scopes System.Collections.Generic.IReadOnlyList<string>? = null optional
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 string required
expiresAt System.DateTimeOffset required
scopes System.Collections.Generic.IReadOnlyList<string>? required
account string? required

Methods

public static GoogleWorkspaceAccessToken FromVerifiedCredential(string accessToken, DateTimeOffset expiresAt, GoogleWorkspaceCredentialBinding credentialBinding) #

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

Parameters

accessToken string required
expiresAt System.DateTimeOffset required
credentialBinding OfficeIMO.GoogleWorkspace.GoogleWorkspaceCredentialBinding required
public bool IsExpired(DateTimeOffset now) #

Determines whether the token has expired at the supplied instant.

Parameters

now System.DateTimeOffset required
Instant to compare with GoogleWorkspaceAccessToken.ExpiresAt.

Returns

bool 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.