Skip to content
Trouble with OAuth 2.0 in the browser? Watch Web Security and BFF with Philippe De Ryck.

Signing Key Store

Duende.IdentityServer.Stores.ISigningKeyStore

Section titled “Duende.IdentityServer.Stores.ISigningKeyStore”

Used to dynamically load client configuration.

/// <summary>
/// Interface to model storage of serialized keys.
/// </summary>
public interface ISigningKeyStore
{
/// <summary>
/// Returns all the keys in storage.
/// </summary>
/// <returns></returns>
Task<IEnumerable<SerializedKey>> LoadKeysAsync();
/// <summary>
/// Persists new key in storage.
/// </summary>
/// <param name="key"></param>
/// <returns></returns>
Task StoreKeyAsync(SerializedKey key);
/// <summary>
/// Deletes key from storage.
/// </summary>
/// <param name="id"></param>
/// <returns></returns>
Task DeleteKeyAsync(string id);
}
/// <summary>
/// Serialized key.
/// </summary>
public class SerializedKey
{
/// <summary>
/// Version number of serialized key.
/// </summary>
public int Version { get; set; }
/// <summary>
/// Key identifier.
/// </summary>
public string Id { get; set; }
/// <summary>
/// Date key was created.
/// </summary>
public DateTime Created { get; set; }
/// <summary>
/// The algorithm.
/// </summary>
public string Algorithm { get; set; }
/// <summary>
/// Contains X509 certificate.
/// </summary>
public bool IsX509Certificate { get; set; }
/// <summary>
/// Serialized data for key.
/// </summary>
public string Data { get; set; }
/// <summary>
/// Indicates if data is protected.
/// </summary>
public bool DataProtected { get; set; }
}