Table of Contents

Class SignedUriOptions

Namespace
Cuemon.Extensions.Net.Security
Assembly
Cuemon.Extensions.Net.dll
public class SignedUriOptions : IParameterObject
Inheritance
Object
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.

PropertyInitial Value
AlgorithmHmacSha256
CanonicalRepresentationBuilderuriString => HasContentMd5Header ? string.Join("\n", ContentMd5Header, uriString) : uriString;
ContentMd5Headernull
SignatureFieldNamesig
StartFieldNamest
ExpiryFieldNamese

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

System.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

System.ArgumentNullException

value cannot be null.

System.ArgumentException

value cannot be empty or consist only of white-space characters.

System.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

System.ArgumentNullException

value cannot be null.

System.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

System.ArgumentNullException

value cannot be null.

System.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

System.ArgumentNullException

value cannot be null.

System.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.