Table of Contents

Class CredentialConfiguration

Namespace
GenerativeAI.Core
Assembly
GenerativeAI.dll

Provides credentials required for API authentication, supporting both user and service account scenarios.

public sealed class CredentialConfiguration : ClientSecrets
Inheritance
CredentialConfiguration
Inherited Members
Extension Methods

Constructors

CredentialConfiguration()

Represents the configuration for API authentication credentials.

public CredentialConfiguration()

Remarks

This class is used to encapsulate various properties required for authentication such as client secrets for web and installed applications, account details, and token information. It supports both user-based and service account authentication scenarios in API integrations.

CredentialConfiguration(ClientSecrets, ClientSecrets, string, string, string, string)

Represents a configuration for client credentials used in API authentication.

public CredentialConfiguration(ClientSecrets web, ClientSecrets installed, string account, string refreshToken, string type, string universeDomain)

Parameters

web ClientSecrets
installed ClientSecrets
account string
refreshToken string
type string
universeDomain string

Remarks

Encapsulates detailed information including web and installed application credentials, account details, and additional parameters like refresh tokens and domains. This class supports scenarios requiring user or service account authentication for API access.

Properties

Account

Identifies the user or service account used by the application.

public string Account { get; set; }

Property Value

string

Installed

Client secrets configured for desktop or installed application flows.

public ClientSecrets Installed { get; set; }

Property Value

ClientSecrets

ProjectId

Represents the identifier of a project in the provider's platform.

public string ProjectId { get; set; }

Property Value

string

QuotaProjectId

Sets or retrieves the same identifier used for project-level operations and quotas.

public string QuotaProjectId { get; set; }

Property Value

string

RefreshToken

Stores a token that can be used to refresh access without requesting full credentials again.

public string RefreshToken { get; set; }

Property Value

string

Type

Specifies the account type, such as a service account or user account.

public string Type { get; set; }

Property Value

string

UniverseDomain

Indicates the domain or environment scope for the application.

public string UniverseDomain { get; set; }

Property Value

string

Web

Client secrets configured for web-based OAuth 2.0 flows.

public ClientSecrets Web { get; set; }

Property Value

ClientSecrets