Class HttpFailingAuthenticator
public class HttpFailingAuthenticator : IHttpAuthenticator
- Inheritance
-
HttpFailingAuthenticator
- Implements
- Inherited Members
- Extension Methods
Constructors
HttpFailingAuthenticator(HttpFailingAuthenticatorOptions, IServiceProvider)
public HttpFailingAuthenticator(HttpFailingAuthenticatorOptions options, IServiceProvider sp)
Parameters
options
HttpFailingAuthenticatorOptionssp
IServiceProvider
Methods
AddAuthentication(HttpRequestMessage, Dictionary<string, string>)
Authentication mechanism implementation.
public Task<HttpClient?> AddAuthentication(HttpRequestMessage request, Dictionary<string, string> _)
Parameters
request
HttpRequestMessageThe HTTP request about to be transmitted
_
Dictionary<string, string>
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.