JwkSet

data class JwkSet(val keys: List<Jwk>)(source)

A JSON Web Key Set (JWKS) — a container for one or more Jwk objects.

Typically served from a JWKS discovery endpoint (e.g. /.well-known/jwks.json).

Constructors

Link copied to clipboard
constructor(keys: List<Jwk>)

Properties

Link copied to clipboard
val keys: List<Jwk>

The list of JWK values contained in this key set (RFC 7517 §5.1 keys parameter).

Functions

Link copied to clipboard
fun findById(kid: String): Jwk?

Returns the first key whose Jwk.kid matches kid, or null if not found.

Link copied to clipboard
fun findByUse(use: String): List<Jwk>

Returns all keys whose Jwk.use matches use (e.g. "sig" or "enc").

Link copied to clipboard

Returns a new JwkSet containing only public keys (no private key material).