JSON Web Key (JWK). "RSA", "EC", "OKP", and "oct" key types are supported.

interface Jwk {
    alg?: string;
    crv?: string;
    d?: string;
    dp?: string;
    dq?: string;
    e?: string;
    ext?: "true" | "false";
    k?: string;
    key_ops?: JwkOperation[];
    kid?: string;
    kty: JwkType;
    n?: string;
    oth?: {
        d: string;
        r: string;
        t: string;
    }[];
    p?: string;
    q?: string;
    qi?: string;
    use?: string;
    x?: string;
    x5c?: string;
    x5t?: string;
    x5t#S256?: string;
    x5u?: string;
    y?: string;
    [key: string]: unknown;
}

Indexable

[key: string]: unknown

Properties

alg?: string

JWK Algorithm Parameter. The algorithm intended for use with the key.

crv?: string

The cryptographic curve used with the key.

d?: string

Private key component for EC, OKP, or RSA keys.

dp?: string

First factor's CRT exponent for RSA

dq?: string

Second factor's CRT exponent for RSA

e?: string

Public exponent for RSA

ext?: "true" | "false"

JWK Extractable Parameter

k?: string

The "k" (key value) parameter contains the value of the symmetric (or other single-valued) key.

key_ops?: JwkOperation[]

JWK Key Operations Parameter

kid?: string

JWK Key ID Parameter

kty: JwkType

JWK Key Type Parameter

n?: string

Modulus for RSA

oth?: {
    d: string;
    r: string;
    t: string;
}[]

Other primes information (optional in RFC 7518)

Type declaration

  • d: string

    Other primes' CRT exponent

  • r: string

    Other primes' factor

  • t: string

    Other primes' CRT coefficient

p?: string

First prime factor for RSA

q?: string

Second prime factor for RSA

qi?: string

First CRT coefficient for RSA

use?: string

JWK Public Key Use Parameter

x?: string

The x-coordinate for the Elliptic Curve point.

x5c?: string

JWK X.509 Certificate Chain Parameter

x5t?: string

JWK X.509 Certificate SHA-1 Thumbprint Parameter

x5t#S256?: string

JWK X.509 Certificate SHA-256 Thumbprint Parameter

x5u?: string

JWK X.509 URL Parameter

y?: string

The y-coordinate for the Elliptic Curve point.