Class XapiCredentials
How the client authenticates: HTTP Basic or a bearer token.
public sealed class XapiCredentials
- Inheritance
-
XapiCredentials
- Inherited Members
Remarks
IEEE 9274.1.1, 4.1.8 leaves the scheme to the LRS. Other schemes can be added with a DelegatingHandler and Credentials left empty.
Methods
Basic(string, string)
HTTP Basic authentication with an LRS key and secret (UTF-8 encoded).
public static XapiCredentials Basic(string key, string secret)
Parameters
Returns
- XapiCredentials
The credentials.
Bearer(Func<CancellationToken, ValueTask<string>>)
A bearer token, asked for before every request so the provider can cache and refresh it.
public static XapiCredentials Bearer(Func<CancellationToken, ValueTask<string>> tokenProvider)
Parameters
tokenProviderFunc<CancellationToken, ValueTask<string>>Returns the current token, without the
Bearerprefix.
Returns
- XapiCredentials
The credentials.