API Reference
Class
GoogleWorkspaceSession
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.
Accepted by parameters 2
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
- Source used to acquire scoped Google OAuth tokens.
- options OfficeIMO.GoogleWorkspace.GoogleWorkspaceSessionOptions? = null
- 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>
- OAuth scopes required by the operation. Blank and duplicate entries are removed.
- cancellationToken System.Threading.CancellationToken = default
- 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:
GoogleDriveFileLocationCombines an operation-specific Drive location with the session defaults.
Parameters
- location OfficeIMO.GoogleWorkspace.GoogleDriveFileLocation?
- Location supplied by the operation, or null to use all defaults.
Returns
A new location instance; the supplied instance is not modified.
Inherited Methods
public virtual Boolean Equals(Object? obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object?