Class HmacAuthorizationHeaderBuilder<TAuthorizationHeaderBuilder>
- Assembly
- Cuemon.AspNetCore.Authentication.dll
Represents the base class from which all builder implementations that represent a HTTP HMAC Authentication header should derive.
public abstract class HmacAuthorizationHeaderBuilder<TAuthorizationHeaderBuilder> : AuthorizationHeaderBuilder<HmacAuthorizationHeader, TAuthorizationHeaderBuilder> where TAuthorizationHeaderBuilder : HmacAuthorizationHeaderBuilder<TAuthorizationHeaderBuilder>
Type Parameters
TAuthorizationHeaderBuilder
- Inheritance
-
AuthorizationHeaderBuilder<HmacAuthorizationHeader, TAuthorizationHeaderBuilder>HmacAuthorizationHeaderBuilder<TAuthorizationHeaderBuilder>
- Derived
- Inherited Members
Constructors
HmacAuthorizationHeaderBuilder(String)
Initializes a new instance of the HmacAuthorizationHeaderBuilder<TAuthorizationHeaderBuilder> class.
protected HmacAuthorizationHeaderBuilder(string authenticationScheme)
Parameters
authenticationScheme
StringThe name of the authentication scheme.
Methods
AddClientId(String)
Adds the client identifier that is the public key of the signing process.
public TAuthorizationHeaderBuilder AddClientId(string clientId)
Parameters
clientId
StringThe client identifier that is the public key of the signing process.
Returns
- TAuthorizationHeaderBuilder
A reference to this instance so that additional calls can be chained.
AddClientSecret(String)
Adds the client secret that is the private key of the signing process.
public TAuthorizationHeaderBuilder AddClientSecret(string clientSecret)
Parameters
clientSecret
StringThe client secret that is the private key of the signing process.
Returns
- TAuthorizationHeaderBuilder
A reference to this instance so that additional calls can be chained.
AddFromRequest(HttpRequest)
Adds the necessary fields that is part of an HTTP request.
public abstract TAuthorizationHeaderBuilder AddFromRequest(HttpRequest request)
Parameters
request
HttpRequestAn instance of the Microsoft.AspNetCore.Http.HttpRequest object.
Returns
- TAuthorizationHeaderBuilder
A reference to this instance so that additional calls can be chained.
AddSignedHeaders(String[])
Adds the headers that will be part of the signing process.
public virtual TAuthorizationHeaderBuilder AddSignedHeaders(params string[] signedHeaders)
Parameters
signedHeaders
String[]The headers that will be part of the signing process.
Returns
- TAuthorizationHeaderBuilder
A reference to this instance so that additional calls can be chained.
ComputeCanonicalRequest()
Converts the request to a standardized (canonical) format and computes a message digest.
public abstract string ComputeCanonicalRequest()
Returns
ComputeSignature()
Computes the signature of this instance using a series of hash-based message authentication codes (HMACs).
public abstract string ComputeSignature()