CasCap.Api.Azure.Auth
1.4.3
Prefix Reserved
See the version list below for details.
dotnet add package CasCap.Api.Azure.Auth --version 1.4.3
NuGet\Install-Package CasCap.Api.Azure.Auth -Version 1.4.3
<PackageReference Include="CasCap.Api.Azure.Auth" Version="1.4.3" />
<PackageVersion Include="CasCap.Api.Azure.Auth" Version="1.4.3" />
<PackageReference Include="CasCap.Api.Azure.Auth" />
paket add CasCap.Api.Azure.Auth --version 1.4.3
#r "nuget: CasCap.Api.Azure.Auth, 1.4.3"
#:package CasCap.Api.Azure.Auth@1.4.3
#addin nuget:?package=CasCap.Api.Azure.Auth&version=1.4.3
#tool nuget:?package=CasCap.Api.Azure.Auth&version=1.4.3
CasCap.Api.Azure.Auth
Helper library for Azure authentication. Provides a factory for creating TokenCredential instances from certificate-based configuration properties and an abstraction for Azure Key Vault and Entra ID settings.
Target frameworks: net8.0, net9.0, net10.0
Services / Extensions
| Type | Name | Description |
|---|---|---|
| Interface | IAzureAuthConfig |
Exposes Azure authentication configuration: Key Vault name/URI, Entra ID tenant/application IDs, certificate thumbprint or PFX path/password, and a lazily-resolved TokenCredential. |
| Static factory | TokenCredentialExtensions |
Creates ClientCertificateCredential from IAzureAuthConfig properties (certificate thumbprint or PFX file). |
Key Methods
TokenCredentialExtensions.IsPodManagedIdentity— Checks whether the current pod is using Azure workload identity (federated tokens).TokenCredentialExtensions.CreateTokenCredential(IAzureAuthConfig)— Creates aClientCertificateCredentialfrom the certificate properties in the configuration, or returnsnullif no certificate is available.
Configuration
| Class | Section | Properties |
|---|---|---|
AzureAuthConfig |
AppConfig |
KeyVaultName (required), AzureEntraPodManagedIdentityClientId, AzureEntraTenantId, AzureEntraApplicationId, AzureEntraCertThumbprint, AzureEntraPfxPath, AzureEntraPfxPassword |
AzureAuthConfig implements both IAppConfig and IAzureAuthConfig. The TokenCredential property is lazily created from the certificate properties via TokenCredentialExtensions.
Data Flow
TokenCredential creation from configuration:
flowchart TD
CONFIG["AzureAuthConfig<br/>(IAzureAuthConfig)"]
subgraph Detection["Environment Detection"]
POD_CHECK{"IsPodManagedIdentity()?<br/>(Azure Workload Identity)"}
WORKLOAD["WorkloadIdentityCredential<br/>(Federated token from pod)"]
end
subgraph CertificateSource["Certificate Source"]
THUMBPRINT{"CertThumbprint<br/>provided?"}
PFX{"PfxPath +<br/>PfxPassword<br/>provided?"}
STORE["X509Store<br/>(LocalMachine\\My)"]
FILE["X509Certificate2<br/>(from PFX file)"]
end
CREDENTIAL["ClientCertificateCredential"]
NULL["null<br/>(no credential)"]
subgraph AzureServices["Azure Services"]
KV["Key Vault"]
STORAGE["Storage"]
EH["Event Hub"]
SB["Service Bus"]
end
CONFIG --> POD_CHECK
POD_CHECK -->|"Yes"| WORKLOAD
POD_CHECK -->|"No"| THUMBPRINT
THUMBPRINT -->|"Yes"| STORE
THUMBPRINT -->|"No"| PFX
PFX -->|"Yes"| FILE
PFX -->|"No"| NULL
STORE --> CREDENTIAL
FILE --> CREDENTIAL
WORKLOAD --> KV
WORKLOAD --> STORAGE
WORKLOAD --> EH
WORKLOAD --> SB
CREDENTIAL --> KV
CREDENTIAL --> STORAGE
CREDENTIAL --> EH
CREDENTIAL --> SB
Credential Resolution Priority:
- Azure Workload Identity (Kubernetes pod with federated token) — auto-detected
- Certificate thumbprint — searches
LocalMachine\Mycertificate store - PFX file — loads certificate from path with password
- null — no credential available
Dependencies
NuGet Packages
| Package |
|---|
| Azure.Identity |
| CasCap.Common.Abstractions |
| CasCap.Common.Extensions |
| CasCap.Common.Logging |
Project References
None.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- Azure.Identity (>= 1.21.0)
- CasCap.Common.Abstractions (>= 4.9.1)
- CasCap.Common.Extensions (>= 4.9.1)
- CasCap.Common.Logging (>= 4.9.1)
-
net8.0
- Azure.Identity (>= 1.21.0)
- CasCap.Common.Abstractions (>= 4.9.1)
- CasCap.Common.Extensions (>= 4.9.1)
- CasCap.Common.Logging (>= 4.9.1)
-
net9.0
- Azure.Identity (>= 1.21.0)
- CasCap.Common.Abstractions (>= 4.9.1)
- CasCap.Common.Extensions (>= 4.9.1)
- CasCap.Common.Logging (>= 4.9.1)
NuGet packages (4)
Showing the top 4 NuGet packages that depend on CasCap.Api.Azure.Auth:
| Package | Downloads |
|---|---|
|
CasCap.Api.Buderus.Sinks
Pluggable event sink implementations (Redis, Azure Tables) for the CasCap.Api.Buderus heating integration library. |
|
|
CasCap.Api.DoorBird.Sinks
Pluggable event sink implementations (Redis, Azure Tables, Azure Blob Storage) for the CasCap.Api.DoorBird door station integration library. |
|
|
CasCap.Api.Knx.Sinks
Pluggable event sink implementations (Redis, Azure Tables) for the CasCap.Api.Knx building automation integration library. |
|
|
CasCap.Api.Fronius.Sinks
Pluggable event sink implementations (Redis, Azure Tables) for the CasCap.Api.Fronius solar inverter integration library. |
GitHub repositories
This package is not used by any popular GitHub repositories.