Class IOrderContextExtensions
Extension methods for IOrderContext.
Inheritance
Namespace: Certes
Assembly: Certes.dll
Syntax
public static class IOrderContextExtensions
Methods
| Edit this page View SourceAuthorization(IOrderContext, string, IdentifierType, CancellationToken)
Gets the authorization by identifier.
Declaration
public static Task<IAuthorizationContext> Authorization(this IOrderContext context, string value, IdentifierType type = IdentifierType.Dns, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| IOrderContext | context | The order context. |
| string | value | The identifier value. |
| IdentifierType | type | The identifier type. |
| CancellationToken | cancellationToken | Cancels this operation. |
Returns
| Type | Description |
|---|---|
| Task<IAuthorizationContext> | The authorization found. |
CreateCsr(IOrderContext, IKey, CancellationToken)
Creates CSR from the order.
Declaration
public static Task<CertificationRequestBuilder> CreateCsr(this IOrderContext context, IKey key, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| IOrderContext | context | The order context. |
| IKey | key | The private key. |
| CancellationToken | cancellationToken | Cancels this operation. |
Returns
| Type | Description |
|---|---|
| Task<CertificationRequestBuilder> | The CSR. |
Finalize(IOrderContext, CsrInfo, IKey, CancellationToken)
Finalizes the certificate order.
Declaration
public static Task<Order> Finalize(this IOrderContext context, CsrInfo csr, IKey key, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| IOrderContext | context | The order context. |
| CsrInfo | csr | The CSR. |
| IKey | key | The private key for the certificate. |
| CancellationToken | cancellationToken | Cancels this operation. |
Returns
| Type | Description |
|---|---|
| Task<Order> | The order finalized. |
Generate(IOrderContext, CsrInfo, IKey, string, int, CancellationToken)
Finalizes and download the certifcate for the order.
Declaration
public static Task<CertificateChain> Generate(this IOrderContext context, CsrInfo csr, IKey key, string preferredChain = null, int retryCount = 60, CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| IOrderContext | context | The order context. |
| CsrInfo | csr | The CSR. |
| IKey | key | The private key for the certificate. |
| string | preferredChain | The preferred Root Certificate. |
| int | retryCount | Maximum number of polling retries shared by both phases: waiting for the order to become ready before finalize, and waiting for pending/processing states after finalize. (default = 60; negative values are treated as zero) |
| CancellationToken | cancellationToken | Cancels requests and polling delays. |
Returns
| Type | Description |
|---|---|
| Task<CertificateChain> | The certificate generated. |