Table of Contents

Class HttpWsseAuthenticator

Namespace
DCR.Workflow.Effect.Http
Assembly
DCR.Workflow.dll
public class HttpWsseAuthenticator : IHttpAuthenticator
Inheritance
HttpWsseAuthenticator
Implements
Inherited Members
Extension Methods

Constructors

HttpWsseAuthenticator(HttpWsseAuthenticatorOptions, IServiceProvider)

public HttpWsseAuthenticator(HttpWsseAuthenticatorOptions options, IServiceProvider sp)

Parameters

options HttpWsseAuthenticatorOptions
sp IServiceProvider

Fields

WSSE_PROFILE

public static readonly string WSSE_PROFILE

Field Value

string

Methods

AddAuthentication(HttpRequestMessage, Dictionary<string, string>)

Authentication mechanism implementation.

public Task<HttpClient?> AddAuthentication(HttpRequestMessage request, Dictionary<string, string> secrets)

Parameters

request HttpRequestMessage

The 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

Task<HttpClient>

Remarks

The mechanism has two options for adding authentication to the HTTP request in question:

  1. It can directly manipulate the provided , and/or
  2. 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

string

Base64Encode(byte[])

protected static string Base64Encode(byte[] bytes)

Parameters

bytes byte[]

Returns

string

Base64Encode(string)

protected static string Base64Encode(string str)

Parameters

str string

Returns

string

Digester(string, string, string)

The password digester

public string Digester(string nonce, string created, string password)

Parameters

nonce string
created string
password string

Returns

string

GenerateWsseHeader(string, string)

public string GenerateWsseHeader(string username, string password)

Parameters

username string
password string

Returns

string

Noncer()

The noncer

public string Noncer()

Returns

string

Sha1(string)

protected static byte[] Sha1(string str)

Parameters

str string

Returns

byte[]