Class AuthorizationHeader
- Namespace
- Cuemon.AspNetCore.Authentication
- Assembly
- Cuemon.AspNetCore.Authentication.dll
Represents the base class from which all implementations of authorization header should derive.
public abstract class AuthorizationHeader
- Inheritance
-
AuthorizationHeader
- Derived
Constructors
AuthorizationHeader(string)
Initializes a new instance of the AuthorizationHeader class.
protected AuthorizationHeader(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.
Methods
Parse(string, Action<AuthorizationHeaderOptions>)
Parses the specified authorizationHeader
.
public virtual AuthorizationHeader Parse(string authorizationHeader, Action<AuthorizationHeaderOptions> setup)
Parameters
authorizationHeader
stringThe authorization header to parse.
setup
Action<AuthorizationHeaderOptions>The AuthorizationHeaderOptions which need to be configured.
Returns
- AuthorizationHeader
An AuthorizationHeader equivalent of
authorizationHeader
.
ParseCore(IReadOnlyDictionary<string, string>)
The core parser that resolves an AuthorizationHeader from a set of credentials
.
protected abstract 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 abstract string ToString()