Class LacunaCertificateServiceCollectionExtensions
- Namespace
- NuvTools.Security.Certificate.Lacuna.Extensions
- Assembly
- NuvTools.Security.Certificate.Lacuna.dll
Extension methods for registering the certificate authentication and document signing services.
public static class LacunaCertificateServiceCollectionExtensions
- Inheritance
-
LacunaCertificateServiceCollectionExtensions
- Inherited Members
Methods
AddLacunaCertificateAuthentication(IServiceCollection, IConfiguration, string)
Binds RestPkiOptions from configuration and registers Lacuna REST PKI as the ICertificateAuthenticator.
public static IServiceCollection AddLacunaCertificateAuthentication(this IServiceCollection services, IConfiguration configuration, string sectionName = "RestPki")
Parameters
servicesIServiceCollectionThe service collection to add the services to.
configurationIConfigurationConfiguration holding the REST PKI section.
sectionNamestringName of the section to bind. Defaults to SectionName; pass the application's own when its settings already live under another name.
Returns
- IServiceCollection
The service collection for chaining.
Remarks
This is the only place a caller names the provider: everything above it depends on ICertificateAuthenticator, so changing provider is changing this call.
AddLacunaDocumentSigning(IServiceCollection, IConfiguration, string)
Binds RestPkiOptions from configuration and registers Lacuna REST PKI as the IDocumentSigner.
public static IServiceCollection AddLacunaDocumentSigning(this IServiceCollection services, IConfiguration configuration, string sectionName = "RestPki")
Parameters
servicesIServiceCollectionThe service collection to add the services to.
configurationIConfigurationConfiguration holding the REST PKI section.
sectionNamestringName of the section to bind. Defaults to SectionName; pass the application's own when its settings already live under another name.
Returns
- IServiceCollection
The service collection for chaining.
Remarks
Independent of AddLacunaCertificateAuthentication(IServiceCollection, IConfiguration, string): an application that only signs documents registers only this, and one that does both calls both — they read the same section.