Class KeyVaultSigningServiceCollectionExtensions
- Namespace
- NuvTools.Security.Signing.Azure.Extensions
- Assembly
- NuvTools.Security.Signing.Azure.dll
Extension methods for registering the Azure Key Vault signing keys.
public static class KeyVaultSigningServiceCollectionExtensions
- Inheritance
-
KeyVaultSigningServiceCollectionExtensions
- Inherited Members
Methods
AddKeyVaultSigningKeys(IServiceCollection, IConfiguration, string, TokenCredential?)
Binds KeyVaultSigningOptions from configuration and registers Azure Key Vault as the ISigningKeyProvider.
public static IServiceCollection AddKeyVaultSigningKeys(this IServiceCollection services, IConfiguration configuration, string sectionName = "KeyVaultSigning", TokenCredential? credential = null)
Parameters
servicesIServiceCollectionThe service collection to add the services to.
configurationIConfigurationConfiguration holding the signing section.
sectionNamestringName of the section to bind. Defaults to SectionName; pass the application's own when its settings already live under another name.
credentialTokenCredentialThe identity to reach the vault with. Defaults to DefaultAzureCredential, which resolves a managed identity when deployed and the developer's own login on a workstation.
Returns
- IServiceCollection
The service collection for chaining.
Remarks
This is the only place a caller names the key store: everything above it depends on ISigningKeyProvider, so changing store is changing this call.