Table of Contents

Interface IJwksStore

Namespace
Tenduke.Core.Jwt
Assembly
Tenduke.Core.dll

Represent a store for JSON Web Keys from a specific service or APIs JWKS endpoint

public interface IJwksStore

Methods

LoadAsync()

Load the public keys from storage

Task<IEnumerable<JsonWebKey>> LoadAsync()

Returns

Task<IEnumerable<JsonWebKey>>

SaveAsync(IEnumerable<JsonWebKey>)

Save the public keys to storage

Task SaveAsync(IEnumerable<JsonWebKey> keys)

Parameters

keys IEnumerable<JsonWebKey>

Returns

Task

TryGetJsonWebKeyAsync(string)

Attempt to read the JSON Web Key identified by the specified key id

Task<(bool found, JsonWebKey? jsonWebKey)> TryGetJsonWebKeyAsync(string keyId)

Parameters

keyId string

Identifier of the key to retrieve (typically from the header of a JWT.

Returns

Task<(bool found, JsonWebKey jsonWebKey)>

A tuple with a bool indicating success or failure (true if the key is found; otherwise false) and the key if found