Table of Contents

Class DigestAuthorizationHeader

Namespace
Cuemon.AspNetCore.Authentication.Digest
Assembly
Cuemon.AspNetCore.Authentication.dll

Provides a representation of a HTTP Digest Access Authentication header. Implements the AuthorizationHeader

public class DigestAuthorizationHeader : AuthorizationHeader
Inheritance
DigestAuthorizationHeader
Inherited Members

Constructors

DigestAuthorizationHeader(String, String, String, String, String, String, String, String, String, String, String)

Initializes a new instance of the DigestAuthorizationHeader class.

public DigestAuthorizationHeader(string realm, string nonce, string opaque, string stale, string algorithm, string userName, string uri, string nc, string cNonce, string qop, string response)

Parameters

realm String

The realm/credential scope that defines the remote resource.

nonce String

The unique server generated string.

opaque String

The string of data specified by the server.

stale String

The case-insensitive flag indicating if the previous request from the client was rejected because the nonce value was stale.

algorithm String

The algorithm used to produce the digest and an unkeyed digest.

userName String

The username of the specified realm.

uri String

The effective request URI.

nc String

The hexadecimal count of the number of requests the client has sent with the nonce value.

cNonce String

The unique client generated string.

qop String

The "quality of protection" the client has applied to the message.

response String

The computed response which proves that the user knows a password.

Fields

Scheme

The authentication scheme of the DigestAuthorizationHeader.

public const string Scheme = "Digest"

Field Value

String

Properties

Algorithm

Gets the algorithm used to produce the digest and an unkeyed digest.

public string Algorithm { get; }

Property Value

String

The algorithm used to produce the digest and an unkeyed digest.

CNonce

Gets the unique client generated string.

public string CNonce { get; }

Property Value

String

The unique client generated string.

NC

Gets the hexadecimal count of the number of requests the client has sent with the Nonce value.

public string NC { get; }

Property Value

String

The hexadecimal count of the number of requests the client has sent with the Nonce value.

Nonce

Gets the unique server generated string.

public string Nonce { get; }

Property Value

String

The unique server generated string.

Opaque

Gets the string of data specified by the server.

public string Opaque { get; }

Property Value

String

The string of data specified by the server.

Qop

Gets the "quality of protection" the client has applied to the message.

public string Qop { get; }

Property Value

String

The "quality of protection" the client has applied to the message.

Realm

Gets the realm/credential scope that defines the remote resource.

public string Realm { get; }

Property Value

String

The realm/credential scope that defines the remote resource.

Response

Gets the computed response which proves that the user knows a password.

public string Response { get; }

Property Value

String

The computed response which proves that the user knows a password.

Stale

Gets the case-insensitive flag indicating if the previous request from the client was rejected because the Nonce value was stale.

public string Stale { get; }

Property Value

String

The case-insensitive flag indicating if the previous request from the client was rejected because the Nonce value was stale.

Uri

Gets the effective request URI.

public string Uri { get; }

Property Value

String

The effective request URI.

UserName

Gets the username of the specified Realm.

public string UserName { get; }

Property Value

String

The username of the specified Realm.

Methods

Create(String)

Creates an instance of DigestAuthorizationHeader from the specified parameters.

public static DigestAuthorizationHeader Create(string authorizationHeader)

Parameters

authorizationHeader String

The raw HTTP authorization header.

Returns

DigestAuthorizationHeader

An instance of DigestAuthorizationHeader.

Exceptions

ArgumentNullException

authorizationHeader cannot be null.

ArgumentException

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

ParseCore(IReadOnlyDictionary<String, String>)

The core parser that resolves an AuthorizationHeader from a set of credentials.

protected override AuthorizationHeader ParseCore(IReadOnlyDictionary<string, string> credentials)

Parameters

credentials IReadOnlyDictionary<String, String>

The credentials used in authentication.

Returns

AuthorizationHeader

An AuthorizationHeader equivalent of credentials.

ToString()

Returns a String that represents this instance.

public override string ToString()

Returns

String

A String that represents this instance.

See Also