Class SignedUriOptions
- Namespace
- Cuemon.Extensions.Net.Security
- Assembly
- 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
Constructors
SignedUriOptions()
Initializes a new instance of the SignedUriOptions class.
public SignedUriOptions()
Remarks
The following table shows the initial property values for an instance of SignedUriOptions.
| Property | Initial Value |
|---|---|
| Algorithm | HmacSha256 |
| CanonicalRepresentationBuilder | uriString => HasContentMd5Header ? string.Join("\n", ContentMd5Header, uriString) : uriString; |
| ContentMd5Header | null |
| SignatureFieldName | sig |
| StartFieldName | st |
| ExpiryFieldName | se |
Properties
Algorithm
Gets or sets the KeyedCryptoAlgorithm that defines the HMAC cryptographic implementation.
public KeyedCryptoAlgorithm Algorithm { get; set; }
Property Value
- KeyedCryptoAlgorithm
The KeyedCryptoAlgorithm that defines the HMAC cryptographic implementation.
CanonicalRepresentationBuilder
Gets or sets the function delegate that produces the output of a canonical message representation.
public Func<string, string> CanonicalRepresentationBuilder { get; set; }
Property Value
- Func<string, string>
The function delegate that produces the output of a canonical message representation.
Exceptions
- ArgumentNullException
valuecannot be null.
ContentMd5Header
Gets or sets the Content-MD5 header representation.
public string ContentMd5Header { get; set; }
Property Value
- string
The Content-MD5 header representation.
Exceptions
- ArgumentNullException
valuecannot be null.- ArgumentException
valuecannot be empty or consist only of white-space characters.- ArgumentOutOfRangeException
valuemust consist only of base-64 digits - or -valuehas a length that is lower than 128-bit / 16 byte - or -valuehas a length that is greater than 128-bit / 16 byte.
ExpiryFieldName
Gets or sets the name of the expiry field in the querystring. Default is "se".
public string ExpiryFieldName { get; set; }
Property Value
- string
The name of the expiry field in the querystring.
Exceptions
- ArgumentNullException
valuecannot be null.- ArgumentException
valuecannot be empty or consist only of white-space characters.
HasContentMd5Header
Gets a value indicating whether this instance has a Content-MD5 header representation.
public bool HasContentMd5Header { get; }
Property Value
- bool
trueif this instance has a Content-MD5 header representation; otherwise,false.
SignatureFieldName
Gets or sets the name of the signature field in the querystring. Default is "sig".
public string SignatureFieldName { get; set; }
Property Value
- string
The name of the signature field in the querystring.
Exceptions
- ArgumentNullException
valuecannot be null.- ArgumentException
valuecannot be empty or consist only of white-space characters.
StartFieldName
Gets or sets the name of the start field in the querystring. Default is "st".
public string StartFieldName { get; set; }
Property Value
- string
The name of the start field in the querystring.
Exceptions
- ArgumentNullException
valuecannot be null.- ArgumentException
valuecannot be empty or consist only of white-space characters.
UrlEncode
Gets or sets a value indicating whether the signed URI should be URL encoded.
public bool UrlEncode { get; set; }
Property Value
- bool
trueif signed URI should be URL encoded; otherwise,false.