Table of Contents

Class XapiCredentials

Namespace
Xapi.Client
Assembly
Xapi.Client.dll

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

key string

The key (user name).

secret string

The secret (password).

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

tokenProvider Func<CancellationToken, ValueTask<string>>

Returns the current token, without the Bearer prefix.

Returns

XapiCredentials

The credentials.