Class HttpWsseAuthenticator
public class HttpWsseAuthenticator : IHttpAuthenticator
- Inheritance
-
HttpWsseAuthenticator
- Implements
- Inherited Members
- Extension Methods
Constructors
HttpWsseAuthenticator(HttpWsseAuthenticatorOptions, IServiceProvider)
public HttpWsseAuthenticator(HttpWsseAuthenticatorOptions options, IServiceProvider sp)
Parameters
options
HttpWsseAuthenticatorOptionssp
IServiceProvider
Fields
WSSE_PROFILE
public static readonly string WSSE_PROFILE
Field Value
Methods
AddAuthentication(HttpRequestMessage, Dictionary<string, string>)
Authentication mechanism implementation.
public Task<HttpClient?> AddAuthentication(HttpRequestMessage request, Dictionary<string, string> secrets)
Parameters
request
HttpRequestMessageThe HTTP request about to be transmitted
secrets
Dictionary<string, string>Host-system provided secrets that the mechanism may use. ('Secrets' is 'secret from the DCR model'; it may include information about, e.g., the id of the current user for the purposes of looking up credentials.)
Returns
Remarks
The mechanism has two options for adding authentication to the HTTP request in question:
- It can directly manipulate the provided
, and/or - It can return a custom
HttpClient
which will subsequently be used to transmit the request.
Manipulating the request is typically easier, but some authentication mechanisms, notably client certificates, can only be realised by a custom HttpClient.
The authentication mechanism is permitted to do both.
Base64Decode(string)
protected static string Base64Decode(string str)
Parameters
str
string
Returns
Base64Encode(byte[])
protected static string Base64Encode(byte[] bytes)
Parameters
bytes
byte[]
Returns
Base64Encode(string)
protected static string Base64Encode(string str)
Parameters
str
string
Returns
Digester(string, string, string)
The password digester
public string Digester(string nonce, string created, string password)
Parameters
Returns
GenerateWsseHeader(string, string)
public string GenerateWsseHeader(string username, string password)
Parameters
Returns
Noncer()
The noncer
public string Noncer()
Returns
Sha1(string)
protected static byte[] Sha1(string str)
Parameters
str
string
Returns
- byte[]