SignedUriOptions Class
Definition
- Namespace
- Cuemon.Extensions.Net.Security
- Assemblies
- Cuemon.Extensions.Net.dll
Configuration options for ToSignedUri(string, byte[], DateTime?, DateTime?, Action<SignedUriOptions>) and ToSignedUri(Uri, byte[], DateTime?, DateTime?, Action<SignedUriOptions>).
public class SignedUriOptions : IParameterObject
- Inheritance
-
SignedUriOptions
- Implements
- Extension Methods
Examples
The following example demonstrates how to configure SignedUriOptions for generating time-limited signed URIs with HMAC-SHA256.
using Cuemon.Extensions.Net.Security;
using Cuemon.Security.Cryptography;
namespace MyApp.Examples;
public class SignedUriOptionsExample
{
public void Demonstrate()
{
var options = new SignedUriOptions
{
Algorithm = KeyedCryptoAlgorithm.HmacSha256,
SignatureFieldName = "sig",
StartFieldName = "st",
ExpiryFieldName = "se",
UrlEncode = true
};
}
}
Constructors
| Name | Description |
|---|---|
| SignedUriOptions() | Initializes a new instance of the SignedUriOptions class. |
Properties
| Name | Description |
|---|---|
| Algorithm | Gets or sets the KeyedCryptoAlgorithm that defines the HMAC cryptographic implementation. |
| CanonicalRepresentationBuilder | Gets or sets the function delegate that produces the output of a canonical message representation. |
| ContentMd5Header | Gets or sets the Content-MD5 header representation. |
| ExpiryFieldName | Gets or sets the name of the expiry field in the querystring. Default is "se". |
| HasContentMd5Header | Gets a value indicating whether this instance has a Content-MD5 header representation. |
| SignatureFieldName | Gets or sets the name of the signature field in the querystring. Default is "sig". |
| StartFieldName | Gets or sets the name of the start field in the querystring. Default is "st". |
| UrlEncode | Gets or sets a value indicating whether the signed URI should be URL encoded. |