Table of Contents

Class CloudStickConvexToken

Namespace
Hi.Cbtr
Assembly
HiCbtr.dll

Internal Use Only. One answer of the cloud token provider (CloudTokenProvider) for one shape: the signed stick-convex token the cloud licence server built for this device (Token, verified and imported by core in TryCreate(IGetGeneralApt, out string)), or why there is none (Unavailable).

public sealed class CloudStickConvexToken
Inheritance
CloudStickConvexToken
Inherited Members
Extension Methods

Properties

AptKey

The normalised shape string (the seven authored APT values as F12 strings joined by one space), the pre-image of the provider's cache key: the token's apt must equal it, or core refuses the token (-10), so a cache file under the wrong key never hands another shape's convex to this tool.

public string AptKey { get; init; }

Property Value

string

FromCache

Whether Token came from the provider's cache file rather than from the server: a cached token core refuses is reported (ReportImportStatus, which evicts the file) and the provider is asked once more.

public bool FromCache { get; init; }

Property Value

bool

MidB64u

This device's mid, base64url without padding (32 bytes decoded): the token's mid must name it, or core refuses the token (-6).

public string MidB64u { get; init; }

Property Value

string

ReportImportStatus

Called with core's status (negative) when core refused Token, so the provider learns the native verdict of its token and evicts a cached file; null when the provider does not care.

public Action<int> ReportImportStatus { get; init; }

Property Value

Action<int>

Token

The signed token (a JWS of type hinc-stick-convex+jwt) to be verified by core; null when Unavailable says why there is none.

public string Token { get; init; }

Property Value

string

Unavailable

Non-null = no token, and why: offline, a server error, no valid lease, a shape the server refused. Wins over Token.

public string Unavailable { get; init; }

Property Value

string