Table of Contents

Class AuthorizationHeaderBuilder

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

The base class of an AuthorizationHeaderBuilder.

public abstract class AuthorizationHeaderBuilder
Inheritance
Object
AuthorizationHeaderBuilder
Derived

Constructors

AuthorizationHeaderBuilder(String)

Initializes a new instance of the AuthorizationHeaderBuilder class.

protected AuthorizationHeaderBuilder(string authenticationScheme)

Parameters

authenticationScheme String

The name of the authentication scheme.

Properties

AuthenticationScheme

Gets the name of the authentication scheme.

public string AuthenticationScheme { get; }

Property Value

String

The name of the authentication scheme.

Data

Gets the fields added to this instance.

protected IDictionary<string, string> Data { get; }

Property Value

IDictionary<String, String>

The fields added to this instance.

Relation

Gets the relations added to this instance.

protected IDictionary<string, string> Relation { get; }

Property Value

IDictionary<String, String>

The relations added to this instance.

Methods

MapRelation(String, String[])

Maps the logical relation between a memberName and the fieldNames associated.

protected void MapRelation(string memberName, params string[] fieldNames)

Parameters

memberName String

The name of a member.

fieldNames String[]

The field names to associate with memberName.

ToImmutableDictionary()

Converts this instance to an System.Collections.Immutable.ImmutableDictionary<TKey, TValue>.

public ImmutableDictionary<string, string> ToImmutableDictionary()

Returns

ImmutableDictionary<String, String>

An System.Collections.Immutable.ImmutableDictionary<TKey, TValue> equivalent of this instance.

ToString()

Returns a System.String that represents this instance.

public override string ToString()

Returns

String

A System.String that represents this instance.

ValidateData(String[])

Validates that any requiredFieldNames has been added to Data.

protected void ValidateData(params string[] requiredFieldNames)

Parameters

requiredFieldNames String[]

The required field names to validate.

Exceptions

System.ArgumentException

The required field is missing.