Table of Contents

Class ApiKey

Namespace
Zedal.Sdk.Jwt
Assembly
Zedal.Sdk.dll

An API key of an account for processes without a user, created in the ZEDAL portal. It is exchanged together with the AppToken directly for an AccessToken, without a RefreshToken. Store it as a secret.

public sealed class ApiKey
Inheritance
ApiKey
Inherited Members

Remarks

Unlike the tokens an API key is no JWT but an opaque string zedal_ak_<provider_id><key_id><secret>. The SDK reads the provider from it to address the right one. Account, scopes and expiry are not part of the key, only the server knows them.

Constructors

ApiKey(string)

Reads an API key.

Properties

KeyId

The id of the key as the server writes it (lowercase UUID), e.g. in ListApiKeys(ZedalCallContext).

ProviderId

The provider that issued the key.

Value

The key as issued, passed on unchanged.

Methods

ToString()

The key with its secret hidden.

TryParse(string, out ApiKey)

Reads value as an API key.