selectJwk
selectJwk
Selects the one key of a set that can verify selector.
Keys are filtered by kid (when the token has one), key type, use, key_ops, alg and RSA parameters. No match is key_not_found, or key_unsuitable when kid matched only keys that fail the other checks. More than one match is ambiguous_key: a token without kid therefore resolves only against a set with a single usable key.
ts
function selectJwk(
jwks: Jwks,
selector: JwkSelector,
): JoseResult<RsaJwkEntry, Exclude<KeyResolutionErrorCode, "jwks_unavailable" | "aborted">>Parameters
jwks:Jwksselector:JwkSelector