EveBasicAuthentication
NexusLabs.Eve¶
EveBasicAuthentication Class¶
Supplies HTTP Basic credentials for eve requests.
Inheritance System.Object 🡒 EveBasicAuthentication
Implements IEveAuthentication
Constructors¶
EveBasicAuthentication(string, string) Constructor¶
Initializes Basic authentication with a static password.
Parameters¶
username System.String
The Basic authentication username.
password System.String
The Basic authentication password.
EveBasicAuthentication(string, Func\<CancellationToken,ValueTask\<string>>) Constructor¶
Initializes Basic authentication with a per-request password provider.
public EveBasicAuthentication(string username, System.Func<System.Threading.CancellationToken,System.Threading.Tasks.ValueTask<string>> passwordProvider);
Parameters¶
username System.String
The Basic authentication username.
passwordProvider System.Func<System.Threading.CancellationToken,System.Threading.Tasks.ValueTask<System.String>>
The provider invoked before each request.
Methods¶
EveBasicAuthentication.GetHeadersAsync(CancellationToken) Method¶
Resolves headers immediately before an HTTP request is sent.
public System.Threading.Tasks.ValueTask<System.Collections.Generic.IReadOnlyDictionary<string,string>> GetHeadersAsync(System.Threading.CancellationToken cancellationToken);
Parameters¶
cancellationToken System.Threading.CancellationToken
Cancels credential resolution.
Implements GetHeadersAsync(CancellationToken)
Returns¶
System.Threading.Tasks.ValueTask<System.Collections.Generic.IReadOnlyDictionary<System.String,System.String>>
Authentication headers whose values override other configured headers.