Class ImprovedDigestAuthenticator
- Namespace
- WINKOnvif.Core.Authentication
- Assembly
- WINKOnvif.Core.dll
Digest HTTP authentication implementation that works with multiple ONVIF camera endpoints
public class ImprovedDigestAuthenticator : IAuthenticator
- Inheritance
-
ImprovedDigestAuthenticator
- Implements
- Inherited Members
Constructors
ImprovedDigestAuthenticator(HttpClient, ILogger<ImprovedDigestAuthenticator>)
public ImprovedDigestAuthenticator(HttpClient httpClient, ILogger<ImprovedDigestAuthenticator> logger)
Parameters
httpClient
HttpClientlogger
ILogger<ImprovedDigestAuthenticator>
Methods
ApplyAuthentication<TClient, TContract>(TClient, OnvifCredentials)
Applies Digest authentication to a SOAP client
public void ApplyAuthentication<TClient, TContract>(TClient client, OnvifCredentials credentials) where TClient : ClientBase<TContract> where TContract : class
Parameters
client
TClientcredentials
OnvifCredentials
Type Parameters
TClient
TContract
GetAuthHeaderAsync(HttpRequestMessage, OnvifCredentials)
Gets authentication header for HTTP requests
public Task<AuthenticationHeaderValue> GetAuthHeaderAsync(HttpRequestMessage request, OnvifCredentials credentials)
Parameters
request
HttpRequestMessageThe HTTP request to authenticate
credentials
OnvifCredentialsCredentials to use for authentication
Returns
- Task<AuthenticationHeaderValue>
Authentication header value