### Custom DNS Challenge Provider Implementation Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/README.md Implement the IDnsChallengeProvider interface to handle DNS-01 challenges. This example shows how to integrate with an external DNS client. ```csharp public class MyDnsChallengeProvider : IDnsChallengeProvider { private readonly ISomeExternalDnsClient _client; public MyDnsChallengeProvider(ISomeExternalDnsClient client) => _client = client; public Task AddTxtRecordAsync(string domainName, string txt, CancellationToken ct = default) { return _client.AddDnsTxtRecord(domainName, txt, ct); } public Task RemoveTxtRecordAsync(string domainName, string txt, CancellationToken ct = default) { return _client.RemoveDnsTxtRecord(domainName, txt, ct); } } ``` -------------------------------- ### Configure LettuceEncrypt with Azure KeyVault Certificate Source Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/test/Integration/README.md Integrate LettuceEncrypt with Azure KeyVault to store and retrieve certificates. This snippet shows the basic setup for adding the KeyVault source. ```csharp public void ConfigureServices(IServiceCollection services) { services.AddLettuceEncrypt() .AddAzureKeyVaultCertificateSource(o => { o.AzureKeyVaultEndpoint = "https://[url].vault.azure.net/"; }) .PersistCertificatesToAzureKeyVault(); } ``` -------------------------------- ### LettuceEncryptOptions.OnDemandLookupCooldown Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/src/LettuceEncrypt/PublicAPI.Unshipped.txt Gets or sets the cooldown period for on-demand certificate lookups. This prevents excessive lookups within a short timeframe. ```APIDOC ## LettuceEncryptOptions.OnDemandLookupCooldown ### Description Specifies the minimum time interval that must pass between consecutive on-demand certificate lookups. This helps to avoid rate limiting and unnecessary load. ### Property Type - **get**: TimeSpan - **set**: void ``` -------------------------------- ### Configure LettuceEncrypt with Azure KeyVault and Custom Credentials Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/test/Integration/README.md This configuration allows LettuceEncrypt to use Azure KeyVault for certificate storage and retrieval, specifying custom credentials for authentication. Ensure 'Azure.Identity' is installed and consult its documentation for credential management. ```csharp public void ConfigureServices(IServiceCollection services) { services.AddLettuceEncrypt() .AddAzureKeyVaultCertificateSource(o => { o.Credentials = new SomeCredentials(); o.AzureKeyVaultEndpoint = "https://[url].vault.azure.net/"; }) .PersistCertificatesToAzureKeyVault(); } ``` -------------------------------- ### LettuceEncryptOptions.PreferredChain Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/src/LettuceEncrypt/PublicAPI.Unshipped.txt Gets or sets the preferred certificate chain to use. This allows specifying a particular chain if multiple are available. ```APIDOC ## LettuceEncryptOptions.PreferredChain ### Description Allows configuration of a specific certificate chain to be preferred during certificate acquisition. This is useful in environments where multiple certificate authorities or intermediate chains might be available. ### Property Type - **get**: string? - **set**: void ``` -------------------------------- ### LettuceEncryptOptions.EnableOnDemandCertificateLookup Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/src/LettuceEncrypt/PublicAPI.Unshipped.txt Gets or sets a boolean value indicating whether on-demand certificate lookup is enabled. When enabled, certificates will be looked up only when needed. ```APIDOC ## LettuceEncryptOptions.EnableOnDemandCertificateLookup ### Description Controls whether the system should perform on-demand lookups for certificates. This can be useful for optimizing resource usage by only fetching certificates when they are actively required. ### Property Type - **get**: bool - **set**: void ``` -------------------------------- ### Configure LettuceEncrypt with ngrok and Staging Server Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/test/Integration/README.md Use this snippet to configure LettuceEncrypt to use a staging server and a domain name provided by ngrok. Ensure 'UseStagingServer' is set to true to avoid rate limits. ```csharp services.AddLettuceEncrypt(o => { o.DomainNames = new[] { "TMP.ngrok.io" }; o.UseStagingServer = true; // <--- use staging o.AcceptTermsOfService = true; o.EmailAddress = "admin@example.com"; }); ``` -------------------------------- ### Custom Certificate Repository and Source Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/README.md Implement ICertificateRepository to customize certificate saving and ICertificateSource to customize certificate loading. This allows for custom storage solutions like file systems or databases. ```csharp using LettuceEncrypt; using Microsoft.Extensions.DependencyInjection; public void ConfigureServices(IServiceCollection services) { services.AddLettuceEncrypt(); services.AddSingleton(); services.AddSingleton(); } class MyCertRepo : ICertificateRepository { public async Task SaveAsync(X509Certificate2 certificate, CancellationToken cancellationToken) { byte[] certData = certificate.Export(X509ContentType.Pfx, "optionallySetPfxPassword"); // save this data somehow } } class MyCertSource : ICertificateSource { public async Task> GetCertificatesAsync(CancellationToken cancellationToken) { // find and return certificate objects. Return an empty enumerable if none are found } public async Task GetCertificateAsync(string domainName, CancellationToken cancellationToken) { // find and return a certificate valid for domainName, or null if none is found } } ``` -------------------------------- ### Custom Account Store Implementation Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/README.md Implement IAccountStore to customize how the account key, used for interacting with the certificate authority, is saved and retrieved. This ensures account renewal capabilities. ```csharp using LettuceEncrypt; using LettuceEncrypt.Accounts; public void ConfigureServices(IServiceCollection services) { services.AddLettuceEncrypt(); services.AddSingleton(); } class MyAccountStore: IAccountStore { public Task SaveAccountAsync(AccountModel account, CancellationToken cancellationToken) { // save the account object somewhere } // add #nullable enable if using c#, or remove the question mark for older versions of C# public Task GetAccountAsync(CancellationToken cancellationToken) { // return null if there is no account and one will be created for you } } ``` -------------------------------- ### LettuceEncrypt Configuration Options Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/README.md Configure essential LettuceEncrypt settings in appsettings.json. This includes accepting terms of service, specifying domain names, providing an email address, and optionally pinning to a preferred certificate chain. ```json // appsettings.json { "LettuceEncrypt": { // Set this to automatically accept the terms of service of your certificate authority. // If you don't set this in config, you will need to press "y" whenever the application starts "AcceptTermsOfService": true, // You must specify at least one domain name "DomainNames": [ "example.com", "www.example.com" ], // You must specify an email address to register with the certificate authority "EmailAddress": "it-admin@example.com", // Optional - pin the certificate to a specific chain by its root issuer name. // The ACME server returns the matching alternate chain, or its default chain if none matches. // For example, "ISRG Root X1" requests the Let's Encrypt chain rooted at ISRG Root X1 for // maximum device compatibility. Omit to accept the server's default chain. "PreferredChain": "ISRG Root X1" } } ``` -------------------------------- ### Persist Certificates to Directory Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/README.md Configure LettuceEncrypt to save generated certificates and account information to a specified directory in PFX format. Requires a password for encryption. ```csharp using LettuceEncrypt; using Microsoft.Extensions.DependencyInjection; public void ConfigureServices(IServiceCollection services) { services .AddLettuceEncrypt() .PersistDataToDirectory(new DirectoryInfo("C:/data/LettuceEncrypt/"), "Password123"); } ``` -------------------------------- ### AddCertWithDomainNameAsync Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/src/LettuceEncrypt/PublicAPI.Shipped.txt Asynchronously adds a certificate to the runtime store for a given domain name. This is used for storing newly obtained or renewed certificates. ```APIDOC ## AddCertWithDomainNameAsync ### Description Asynchronously adds a certificate to the runtime certificate store, associating it with a specific domain name. ### Method `LettuceEncrypt.IRuntimeCertificateStore.AddCertWithDomainNameAsync(string! domainName, System.Security.Cryptography.X509Certificates.X509Certificate2! certificate)` ### Parameters - **domainName** (string!) - The domain name for which the certificate is being added. - **certificate** (System.Security.Cryptography.X509Certificates.X509Certificate2!) - The X.509 certificate to add. ### Returns - System.Threading.Tasks.Task - A task that represents the asynchronous operation. The task result contains the added certificate. ``` -------------------------------- ### GetAllCertDomainsAsync Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/src/LettuceEncrypt/PublicAPI.Shipped.txt Asynchronously retrieves a list of all domain names for which certificates are currently stored in the runtime store. ```APIDOC ## GetAllCertDomainsAsync ### Description Asynchronously retrieves a collection of all domain names for which certificates are stored in the runtime certificate store. ### Method `LettuceEncrypt.IRuntimeCertificateStore.GetAllCertDomainsAsync()` ### Returns - System.Threading.Tasks.Task!> - A task that represents the asynchronous operation. The task result contains an enumerable collection of domain names. ``` -------------------------------- ### Configure Allowed Challenge Types in appsettings.json Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/README.md Specify which ACME challenge types (Http01, TlsAlpn01, Dns01) LettuceEncrypt should use. This is done via a comma-separated list in the appsettings.json configuration. ```json { "LettuceEncrypt": { "AllowedChallengeTypes": "Http01, TlsAlpn01, Dns01" } } ``` -------------------------------- ### Configure LettuceEncrypt with Kestrel Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/README.md Add LettuceEncrypt services to the DI container and configure Kestrel to use it for HTTPS endpoints. Ensure Kestrel is the edge server for this to function correctly. ```csharp var builder = WebApplication.CreateBuilder(args); // Configure LettuceEncrypt, adding required services to the DI container builder.Services.AddLettuceEncrypt(); builder.WebHost.UseKestrel(k => { // Configure Kestrel to use LettuceEncrypt for HTTPS for this endpoint k.ListenAnyIP(443, o => o.UseLettuceEncrypt(k.ApplicationServices)); }); ``` -------------------------------- ### AzureKeyVaultLettuceEncryptOptions Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/src/LettuceEncrypt.Azure/PublicAPI.Shipped.txt Options class for configuring Azure Key Vault integration with LettuceEncrypt. ```APIDOC ## AzureKeyVaultLettuceEncryptOptions ### Description Provides configuration options for storing certificates in Azure Key Vault. ### Properties - **Credentials** (Azure.Core.TokenCredential?) - The token credential to authenticate with Azure Key Vault. - **AzureKeyVaultEndpoint** (string!) - The URL endpoint of the Azure Key Vault. - **AccountKeySecretName** (string?) - The name of the secret in Azure Key Vault where the account key is stored (optional). ``` -------------------------------- ### Register Custom HTTP Challenge Response Store Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/README.md Implement and register a custom IHttpChallengeResponseStore to support multiple instances behind a load balancer. This allows any instance to respond to LetsEncrypt challenges. ```csharp using Microsoft.Extensions.DependencyInjection; public class Startup { public void ConfigureServices(IServiceCollection services) { services.AddLettuceEncrypt(); services.AddSingleton(); } } class DistributedHttpChallengeResponseStore : IHttpChallengeResponseStore { public void AddChallengeResponse(string token, string response) { // Save somewhere (Azure Storage, etc.) } public bool TryGetResponse(string token, [MaybeNullWhen(false)] out string? value) { // Read from somewhere (Azure Storage, etc.) } } ``` -------------------------------- ### AddChallengeCertWithDomainNameAsync Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/src/LettuceEncrypt/PublicAPI.Shipped.txt Asynchronously adds a challenge certificate to the runtime store for a given domain name. This is typically used during the ACME challenge process. ```APIDOC ## AddChallengeCertWithDomainNameAsync ### Description Asynchronously adds a challenge certificate to the runtime certificate store for a specific domain name. Used during ACME challenge validation. ### Method `LettuceEncrypt.IRuntimeCertificateStore.AddChallengeCertWithDomainNameAsync(string! domainName, System.Security.Cryptography.X509Certificates.X509Certificate2! certificate)` ### Parameters - **domainName** (string!) - The domain name for which the challenge certificate is being added. - **certificate** (System.Security.Cryptography.X509Certificates.X509Certificate2!) - The X.509 challenge certificate to add. ### Returns - System.Threading.Tasks.Task - A task that represents the asynchronous operation. The task result contains the added challenge certificate. ``` -------------------------------- ### UseLettuceEncrypt with Kestrel ListenOptions Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/src/LettuceEncrypt/PublicAPI.Shipped.txt Configures Kestrel to use LettuceEncrypt for HTTPS certificate management. This integrates LettuceEncrypt with the web server's listening options. ```APIDOC ## UseLettuceEncrypt ### Description Configures Kestrel server options to integrate with LettuceEncrypt for automatic SSL certificate management. ### Method `static Microsoft.AspNetCore.Hosting.LettuceEncryptKestrelHttpsOptionsExtensions.UseLettuceEncrypt(this Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions! listenOptions, System.IServiceProvider! applicationServices)` ### Parameters - **listenOptions** (Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions!) - The Kestrel listen options to configure. - **applicationServices** (System.IServiceProvider!) - The application's service provider. ### Returns - Microsoft.AspNetCore.Server.Kestrel.Core.ListenOptions! - The modified listen options. ``` -------------------------------- ### GetCertAsync Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/src/LettuceEncrypt/PublicAPI.Shipped.txt Asynchronously retrieves a certificate from the runtime store for the specified domain name. Returns null if no certificate is found. ```APIDOC ## GetCertAsync ### Description Asynchronously retrieves a certificate from the runtime certificate store for the specified domain name. ### Method `LettuceEncrypt.IRuntimeCertificateStore.GetCertAsync(string! domainName)` ### Parameters - **domainName** (string!) - The domain name for which to retrieve the certificate. ### Returns - System.Threading.Tasks.Task - A task that represents the asynchronous operation. The task result contains the certificate if found, otherwise null. ``` -------------------------------- ### GetChallengeCertAsync Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/src/LettuceEncrypt/PublicAPI.Shipped.txt Asynchronously retrieves a challenge certificate from the runtime store for the specified domain name. Returns null if no challenge certificate is found. ```APIDOC ## GetChallengeCertAsync ### Description Asynchronously retrieves a challenge certificate from the runtime certificate store for the specified domain name. ### Method `LettuceEncrypt.IRuntimeCertificateStore.GetChallengeCertAsync(string! domainName)` ### Parameters - **domainName** (string!) - The domain name for which to retrieve the challenge certificate. ### Returns - System.Threading.Tasks.Task - A task that represents the asynchronous operation. The task result contains the challenge certificate if found, otherwise null. ``` -------------------------------- ### ILettuceEncryptServiceBuilder Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/src/LettuceEncrypt/PublicAPI.Shipped.txt Interface for configuring LettuceEncrypt services. ```APIDOC ## ILettuceEncryptServiceBuilder ### Description Interface used for building and configuring LettuceEncrypt services. ### Properties #### Services Gets the service collection to which LettuceEncrypt services are added. - **Type** - Microsoft.Extensions.DependencyInjection.IServiceCollection! - **Description** - The underlying service collection. ``` -------------------------------- ### TryGetResponse Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/src/LettuceEncrypt/PublicAPI.Shipped.txt Attempts to retrieve a challenge response from the HTTP challenge response store using the provided token. Returns true if a response is found. ```APIDOC ## TryGetResponse ### Description Attempts to retrieve a challenge response from the HTTP challenge response store using the provided token. ### Method `LettuceEncrypt.IHttpChallengeResponseStore.TryGetResponse(string! token, out string? value)` ### Parameters - **token** (string!) - The token of the challenge response to retrieve. - **value** (out string?) - When this method returns, contains the challenge response if found, or null if not found. ``` -------------------------------- ### AnyChallengeCertAsync Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/src/LettuceEncrypt/PublicAPI.Shipped.txt Asynchronously checks if there are any challenge certificates stored in the runtime store. Returns true if at least one challenge certificate exists. ```APIDOC ## AnyChallengeCertAsync ### Description Asynchronously checks if any challenge certificates are present in the runtime certificate store. ### Method `LettuceEncrypt.IRuntimeCertificateStore.AnyChallengeCertAsync()` ### Returns - System.Threading.Tasks.Task - A task that represents the asynchronous operation. The task result is true if at least one challenge certificate exists, false otherwise. ``` -------------------------------- ### GetDomains Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/src/LettuceEncrypt/PublicAPI.Shipped.txt Asynchronously retrieves a list of domains from a domain source. This is used to discover domains for which certificates may be needed. ```APIDOC ## GetDomains ### Description Asynchronously retrieves a list of domains from a configured domain source. ### Method `LettuceEncrypt.IDomainSource.GetDomains(System.Threading.CancellationToken cancellationToken)` ### Parameters - **cancellationToken** (System.Threading.CancellationToken) - A token to observe for cancellation requests. ### Returns - System.Threading.Tasks.Task!> - A task that represents the asynchronous operation. The task result contains an enumerable collection of domain certificates. ``` -------------------------------- ### Persist Certificates to Azure Key Vault Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/README.md Configure LettuceEncrypt to save generated certificates and account information to Azure Key Vault. Requires the Azure Key Vault package and configuration in appsettings.json. ```csharp using LettuceEncrypt; using Microsoft.Extensions.DependencyInjection; public void ConfigureServices(IServiceCollection services) { services .AddLettuceEncrypt() .PersistCertificatesToAzureKeyVault(); } ``` ```json // appsettings.json { "LettuceEncrypt": { "AzureKeyVault": { // Required - specify the name of your key vault "AzureKeyVaultEndpoint": "https://myaccount.vault.azure.net/" // Optional - specify the secret name used to store your account info (used for cert rewewals) // If not specified, name defaults to "le-encrypt-${ACME server URL}" "AccountKeySecretName": "my-lets-encrypt-account" } } } ``` -------------------------------- ### IDnsChallengeProvider Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/src/LettuceEncrypt/PublicAPI.Shipped.txt Interface for interacting with DNS providers to fulfill ACME challenges. ```APIDOC ## IDnsChallengeProvider ### Description Interface for DNS-based ACME challenge providers. ### Methods #### AddTxtRecordAsync Adds a TXT record to the DNS for challenge validation. - **Parameters** - `domainName` (string!) - The domain name for which to add the TXT record. - `txt` (string!) - The TXT record value. - `ct` (System.Threading.CancellationToken) - Token to monitor for cancellation requests. Defaults to `default(System.Threading.CancellationToken)`. - **Returns** - System.Threading.Tasks.Task - A task that represents the asynchronous operation, returning context for the added record. #### RemoveTxtRecordAsync Removes a previously added TXT record from the DNS. - **Parameters** - `context` (LettuceEncrypt.Acme.DnsTxtRecordContext!) - The context of the TXT record to remove. - `ct` (System.Threading.CancellationToken) - Token to monitor for cancellation requests. Defaults to `default(System.Threading.CancellationToken)`. - **Returns** - System.Threading.Tasks.Task - A task that represents the asynchronous operation. ``` -------------------------------- ### ContainsCertForDomainAsync Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/src/LettuceEncrypt/PublicAPI.Shipped.txt Asynchronously checks if a certificate already exists in the runtime store for the specified domain name. ```APIDOC ## ContainsCertForDomainAsync ### Description Asynchronously checks if the runtime certificate store contains a certificate for the specified domain name. ### Method `LettuceEncrypt.IRuntimeCertificateStore.ContainsCertForDomainAsync(string! domainName)` ### Parameters - **domainName** (string!) - The domain name to check for. ### Returns - System.Threading.Tasks.Task - A task that represents the asynchronous operation. The task result is true if a certificate for the domain exists, false otherwise. ``` -------------------------------- ### ICertificateSource Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/src/LettuceEncrypt/PublicAPI.Shipped.txt Interface for retrieving certificates. ```APIDOC ## ICertificateSource ### Description Interface for retrieving certificates. ### Methods #### GetCertificatesAsync Retrieves all available certificates. - **Parameters** - `cancellationToken` (System.Threading.CancellationToken) - Token to monitor for cancellation requests. - **Returns** - System.Threading.Tasks.Task!> - A task that represents the asynchronous operation, yielding an enumerable collection of certificates. ``` -------------------------------- ### ICertificateRepository Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/src/LettuceEncrypt/PublicAPI.Shipped.txt Interface for persisting obtained certificates. ```APIDOC ## ICertificateRepository ### Description Interface for saving certificates. ### Methods #### SaveAsync Saves a certificate to the repository. - **Parameters** - `certificate` (System.Security.Cryptography.X509Certificates.X509Certificate2!) - The certificate to save. - `cancellationToken` (System.Threading.CancellationToken) - Token to monitor for cancellation requests. - **Returns** - System.Threading.Tasks.Task - A task that represents the asynchronous operation. ``` -------------------------------- ### Configure On-Demand Certificate Lookup Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/README.md Control the behavior of on-demand certificate lookups. This includes disabling the feature entirely or adjusting the cooldown period for failed lookups. ```csharp services.AddLettuceEncrypt(o => { // disable on-demand lookups entirely (pre-3.0 behavior) o.EnableOnDemandCertificateLookup = false; // or adjust how long failed lookups are suppressed (default: 5 minutes) o.OnDemandLookupCooldown = TimeSpan.FromMinutes(1); }); ``` -------------------------------- ### ICertificateSource.GetCertificateAsync Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/src/LettuceEncrypt/PublicAPI.Unshipped.txt Asynchronously retrieves an X.509 certificate for a given domain name. This method is part of the certificate source interface, allowing for custom certificate retrieval logic. ```APIDOC ## ICertificateSource.GetCertificateAsync(string domainName, CancellationToken cancellationToken) ### Description Asynchronously retrieves an X.509 certificate for a specified domain name. This is a core method for obtaining SSL/TLS certificates. ### Method Task ### Parameters #### Path Parameters - **domainName** (string) - Required - The domain name for which to retrieve the certificate. - **cancellationToken** (CancellationToken) - Required - A token to monitor for cancellation requests. ### Response #### Success Response - **X509Certificate2?** - A task that represents the asynchronous operation. The task result contains the X509Certificate2 object if found, otherwise null. ``` -------------------------------- ### GetDomainCertsAsync Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/src/LettuceEncrypt/PublicAPI.Shipped.txt Retrieves a collection of domain certificates asynchronously. This method can optionally refresh the cache. ```APIDOC ## GetDomainCertsAsync ### Description Asynchronously retrieves a collection of domain certificates. Allows for optional cache refresh. ### Method `LettuceEncrypt.IDomainLoader.GetDomainCertsAsync(System.Threading.CancellationToken cancellationToken, bool refreshCache = false)` ### Parameters - **cancellationToken** (System.Threading.CancellationToken) - A token to observe for cancellation requests. - **refreshCache** (bool) - If true, the cache will be refreshed before retrieving certificates. Defaults to false. ### Returns - System.Threading.Tasks.Task!> - A task that represents the asynchronous operation. The task result contains an enumerable collection of domain certificates. ``` -------------------------------- ### PersistDataToDirectory Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/src/LettuceEncrypt/PublicAPI.Shipped.txt Persists certificate data to a specified directory. This method is part of the file system storage extensions for LettuceEncrypt. ```APIDOC ## PersistDataToDirectory ### Description Persists certificate data to a specified directory, allowing for file-based storage of certificates. ### Method `static LettuceEncrypt.FileSystemStorageExtensions.PersistDataToDirectory(this LettuceEncrypt.ILettuceEncryptServiceBuilder! builder, System.IO.DirectoryInfo! directory, string? pfxPassword)` ### Parameters - **builder** (LettuceEncrypt.ILettuceEncryptServiceBuilder!) - The LettuceEncrypt service builder. - **directory** (System.IO.DirectoryInfo!) - The directory where certificate data will be persisted. - **pfxPassword** (string?) - An optional password for the PFX file. ``` -------------------------------- ### AddLettuceEncrypt to IServiceCollection Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/src/LettuceEncrypt/PublicAPI.Shipped.txt Registers LettuceEncrypt services with the dependency injection container. This is a prerequisite for using LettuceEncrypt features. ```APIDOC ## AddLettuceEncrypt ### Description Registers LettuceEncrypt services with the dependency injection container, enabling its features throughout the application. ### Method `static Microsoft.Extensions.DependencyInjection.LettuceEncryptServiceCollectionExtensions.AddLettuceEncrypt(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services)` ### Parameters - **services** (Microsoft.Extensions.DependencyInjection.IServiceCollection!) - The service collection to add LettuceEncrypt services to. ### Returns - LettuceEncrypt.ILettuceEncryptServiceBuilder! - A builder for further LettuceEncrypt configuration. ``` -------------------------------- ### Persist Certificates to Azure Key Vault with Configuration Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/src/LettuceEncrypt.Azure/PublicAPI.Shipped.txt Configures LettuceEncrypt to persist certificates to Azure Key Vault, allowing custom configuration via an action delegate. ```APIDOC ## PersistCertificatesToAzureKeyVault with Configuration ### Description Configures LettuceEncrypt to persist certificates to Azure Key Vault, providing a delegate to customize the `AzureKeyVaultLettuceEncryptOptions`. ### Method Extension Method ### Signature `static ILettuceEncryptServiceBuilder PersistCertificatesToAzureKeyVault(this ILettuceEncryptServiceBuilder builder, Action configure)` ### Parameters - **builder** (ILettuceEncryptServiceBuilder) - Required - The service builder instance. - **configure** (Action) - Required - An action delegate to configure the Azure Key Vault options. ``` -------------------------------- ### IAccountStore Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/src/LettuceEncrypt/PublicAPI.Shipped.txt Provides methods for retrieving and saving account information. This is crucial for managing ACME account details. ```APIDOC ## IAccountStore ### Description Interface for managing account data, including retrieval and persistence. ### Methods #### GetAccountAsync Retrieves the current account information. - **Parameters** - `cancellationToken` (System.Threading.CancellationToken) - Token to monitor for cancellation requests. - **Returns** - System.Threading.Tasks.Task - A task that represents the asynchronous operation, yielding the AccountModel or null if not found. #### SaveAccountAsync Saves the provided account information. - **Parameters** - `account` (LettuceEncrypt.Accounts.AccountModel!) - The account model to save. - `cancellationToken` (System.Threading.CancellationToken) - Token to monitor for cancellation requests. - **Returns** - System.Threading.Tasks.Task - A task that represents the asynchronous operation. ``` -------------------------------- ### Persist Certificates to Azure Key Vault Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/src/LettuceEncrypt.Azure/PublicAPI.Shipped.txt Configures LettuceEncrypt to persist certificates to Azure Key Vault. This method uses default configuration settings. ```APIDOC ## PersistCertificatesToAzureKeyVault ### Description Configures LettuceEncrypt to persist certificates to Azure Key Vault using default settings. ### Method Extension Method ### Signature `static ILettuceEncryptServiceBuilder PersistCertificatesToAzureKeyVault(this ILettuceEncryptServiceBuilder builder)` ### Parameters - **builder** (ILettuceEncryptServiceBuilder) - Required - The service builder instance. ``` -------------------------------- ### Dynamically Run ACME Services Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/README.md Conditionally run ACME services based on a custom condition. This is useful for managing certificate generation across multiple service instances. ```csharp using Microsoft.Extensions.DependencyInjection; public class Startup { public void ConfigureServices(IServiceCollection services) { var leBuilder = services.AddLettuceEncrypt(_ => { }, false); // You control this condition if (shouldRunLetsEncryptAcmeServices) { leBuilder.AddLettuceEncryptAcmeService(); } } } ``` -------------------------------- ### AddLettuceEncrypt Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/src/LettuceEncrypt/PublicAPI.Shipped.txt Adds LettuceEncrypt services to the specified IServiceCollection. This method allows for configuration of LettuceEncrypt options and optionally includes ACME services. ```APIDOC ## AddLettuceEncrypt ### Description Adds LettuceEncrypt services to the specified IServiceCollection. This method allows for configuration of LettuceEncrypt options and optionally includes ACME services. ### Method static ### Signature Microsoft.Extensions.DependencyInjection.LettuceEncryptServiceCollectionExtensions.AddLettuceEncrypt(this Microsoft.Extensions.DependencyInjection.IServiceCollection! services, System.Action! configure, bool includeAcmeServices = true) -> LettuceEncrypt.ILettuceEncryptServiceBuilder! ### Parameters - **services** (Microsoft.Extensions.DependencyInjection.IServiceCollection!) - The service collection to add services to. - **configure** (System.Action!) - An action to configure the LettuceEncrypt options. - **includeAcmeServices** (bool) - Optional. Whether to include ACME services. Defaults to true. ### Returns LettuceEncrypt.ILettuceEncryptServiceBuilder! - A builder for further LettuceEncrypt service configuration. ``` -------------------------------- ### AddLettuceEncryptAcmeService Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/src/LettuceEncrypt/PublicAPI.Shipped.txt Adds ACME services to the LettuceEncrypt service builder. This method is used to extend the LettuceEncrypt configuration with ACME-specific services. ```APIDOC ## AddLettuceEncryptAcmeService ### Description Adds ACME services to the LettuceEncrypt service builder. This method is used to extend the LettuceEncrypt configuration with ACME-specific services. ### Method static ### Signature Microsoft.Extensions.DependencyInjection.LettuceEncryptServiceCollectionExtensions.AddLettuceEncryptAcmeService(this LettuceEncrypt.ILettuceEncryptServiceBuilder! builder) -> LettuceEncrypt.ILettuceEncryptServiceBuilder! ### Parameters - **builder** (LettuceEncrypt.ILettuceEncryptServiceBuilder!) - The LettuceEncrypt service builder to add ACME services to. ### Returns LettuceEncrypt.ILettuceEncryptServiceBuilder! - The updated LettuceEncrypt service builder. ``` -------------------------------- ### RemoveChallengeCertAsync Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/src/LettuceEncrypt/PublicAPI.Shipped.txt Asynchronously removes a challenge certificate from the runtime store for the specified domain name. Returns true if the challenge certificate was successfully removed. ```APIDOC ## RemoveChallengeCertAsync ### Description Asynchronously removes a challenge certificate from the runtime certificate store for the specified domain name. ### Method `LettuceEncrypt.IRuntimeCertificateStore.RemoveChallengeCertAsync(string! domainName)` ### Parameters - **domainName** (string!) - The domain name for which to remove the challenge certificate. ### Returns - System.Threading.Tasks.Task - A task that represents the asynchronous operation. The task result is true if the challenge certificate was successfully removed, false otherwise. ``` -------------------------------- ### RemoveCertAsync Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/src/LettuceEncrypt/PublicAPI.Shipped.txt Asynchronously removes a certificate from the runtime store for the specified domain name. Returns true if the certificate was successfully removed. ```APIDOC ## RemoveCertAsync ### Description Asynchronously removes a certificate from the runtime certificate store for the specified domain name. ### Method `LettuceEncrypt.IRuntimeCertificateStore.RemoveCertAsync(string! domainName)` ### Parameters - **domainName** (string!) - The domain name for which to remove the certificate. ### Returns - System.Threading.Tasks.Task - A task that represents the asynchronous operation. The task result is true if the certificate was successfully removed, false otherwise. ``` -------------------------------- ### AddChallengeResponse Source: https://github.com/archonsystemsinc/lettuceencrypt-archon/blob/main/src/LettuceEncrypt/PublicAPI.Shipped.txt Adds a challenge response to the HTTP challenge response store. This is used to store responses that will be served during ACME challenges. ```APIDOC ## AddChallengeResponse ### Description Adds a challenge response to the HTTP challenge response store. This allows the system to serve the correct response during ACME HTTP-01 challenges. ### Method `LettuceEncrypt.IHttpChallengeResponseStore.AddChallengeResponse(string! token, string! response)` ### Parameters - **token** (string!) - The token associated with the challenge. - **response** (string!) - The response to the challenge. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.