Class AuthorizationHeaderBuilder
- Namespace
- Cuemon.AspNetCore.Authentication
- Assembly
- Cuemon.AspNetCore.Authentication.dll
The base class of an AuthorizationHeaderBuilder.
public abstract class AuthorizationHeaderBuilder
- Inheritance
-
AuthorizationHeaderBuilder
- Derived
Constructors
AuthorizationHeaderBuilder(String)
Initializes a new instance of the AuthorizationHeaderBuilder class.
protected AuthorizationHeaderBuilder(string authenticationScheme)
Parameters
authenticationScheme
StringThe 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
StringThe name of a member.
fieldNames
String[]The field names to associate with
memberName
.
ToImmutableDictionary()
Converts this instance to an ImmutableDictionary<TKey,TValue>.
public ImmutableDictionary<string, string> ToImmutableDictionary()
Returns
- ImmutableDictionary<String, String>
An ImmutableDictionary<TKey,TValue> equivalent of this instance.
ToString()
Returns a String that represents this instance.
public override string ToString()
Returns
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
- ArgumentException
The required field is missing.