<PackageReference Include="System.ClientModel" Version="1.12.0" />

System.ClientModel.Primitives.CredentialSettings

public sealed class CredentialSettings
Holds the credential settings used to configure authentication for a client that can be loaded from an IConfigurationSection.
public IConfigurationSection AdditionalProperties { get; set; }

Gets or sets additional properties for the credential.

public string CredentialSource { get; set; }

Gets or sets the source of the credential.

public string this[string key] { get; }

Reads an arbitrary value from the underlying credential configuration section. Library authors can extend the credential schema with custom properties (for example, a service-specific name or region) and surface them via extension methods that read through this indexer, without exposing the underlying IConfigurationSection. Supports the standard configuration : delimiter for nested paths. Returns null when no section was bound or if the specified value does not exist.

public string Key { get; set; }

Gets or sets the ApiKey.

public CredentialSettings(IConfigurationSection section)

Initializes a new instance of the CredentialSettings class.