Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

GoogleWorkspaceSession

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

Represents a configured Google Workspace session used by exporter packages.

Inheritance

  • Object
  • GoogleWorkspaceSession

Usage

Explore 2 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.

Constructors

public GoogleWorkspaceSession(IGoogleWorkspaceCredentialSource credentialSource, GoogleWorkspaceSessionOptions? options = null) #

Creates a session from a credential source and optional transport and policy settings.

Parameters

credentialSource OfficeIMO.GoogleWorkspace.IGoogleWorkspaceCredentialSource requiredposition: 0
Source used to acquire scoped Google OAuth tokens.
options OfficeIMO.GoogleWorkspace.GoogleWorkspaceSessionOptions? = null optionalposition: 1
Session settings, or null to use defaults.

Methods

public async Task<GoogleWorkspaceAccessToken> AcquireAccessTokenAsync(IEnumerable<String> scopes, CancellationToken cancellationToken = default) #
Returns: Task<GoogleWorkspaceAccessToken>

Acquires and validates a token for every requested scope and the configured expected account.

Parameters

scopes System.Collections.Generic.IEnumerable<System.String> requiredposition: 0
OAuth scopes required by the operation. Blank and duplicate entries are removed.
cancellationToken System.Threading.CancellationToken = default optionalposition: 1
Token used to cancel acquisition.

Returns

A nonexpired token whose bound scopes cover the normalized request.

Exceptions

  • InvalidOperationException – The credential source returns no token, an expired token, insufficient scopes, or identity evidence that does not match the session policy.
public GoogleDriveFileLocation ResolveLocationDefaults(GoogleDriveFileLocation? location) #
Returns: GoogleDriveFileLocation

Combines an operation-specific Drive location with the session defaults.

Parameters

location OfficeIMO.GoogleWorkspace.GoogleDriveFileLocation? requiredposition: 0
Location supplied by the operation, or null to use all defaults.

Returns

A new location instance; the supplied instance is not modified.

Properties

public IGoogleWorkspaceCredentialSource CredentialSource { get; } #

Gets the credential source used by this session.

public GoogleWorkspaceSessionOptions Options { get; } #

Gets the transport, retry, identity, and operation-policy settings.