Class SignedUriOptions
- Namespace
- Cuemon.Extensions.Net.Security
- Assembly
- Cuemon.Extensions.Net.dll
Configuration options for ToSignedUri(String, Byte[], Nullable<DateTime>, Nullable<DateTime>, Action<SignedUriOptions>) and ToSignedUri(Uri, Byte[], Nullable<DateTime>, Nullable<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
value
cannot 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
value
cannot be null.- ArgumentException
value
cannot be empty or consist only of white-space characters.- ArgumentOutOfRangeException
value
must consist only of base-64 digits - or -value
has a length that is lower than 128-bit / 16 byte - or -value
has 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
value
cannot be null.- ArgumentException
value
cannot 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
- Boolean
true
if 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
value
cannot be null.- ArgumentException
value
cannot 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
value
cannot be null.- ArgumentException
value
cannot 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
- Boolean
true
if signed URI should be URL encoded; otherwise,false
.