Skip to main content
Developer

JSON Web Key Set (JWKS)#

View as Markdown
On this page

The JSON Web Key Set (JWKS) endpoint provides the public keys that ID Check uses to sign ID tokens. Clients use these keys to verify the signature of the ID tokens that they receive from the token endpoint.

Endpoint#

GET /jwks

Response#

The endpoint returns a JSON Web Key Set (JWKS) as defined in RFC 7517⁠ (opens in a new tab).

Response headers#

HeaderValue
Content-Typeapplication/json
Cache-Controlpublic, max-age=86400

Response body#

{
  "keys": [
    {
      "kty": "EC",
      "use": "sig",
      "kid": "123456789",
      "crv": "P-256",
      "x": "base64url-encoded-x-coordinate",
      "y": "base64url-encoded-y-coordinate",
      "x5c": ["base64-encoded-cert", "..."]
    }
  ]
}

Key properties#

PropertyDescription
ktyKey type. ID Check uses EC (Elliptic Curve) for signing keys.
useKey usage. sig indicates that ID Check uses the key for signatures.
kidKey ID. The certificate serial number. Clients use it to match the key with the kid header in JSON Web Tokens (JWTs).
crvCurve name. ID Check uses P-256 for ES256 signatures.
xBase64url-encoded x-coordinate of the EC public key.
yBase64url-encoded y-coordinate of the EC public key.
x5cX.509 certificate chain. Contains the signing certificate and its issuing CA certificates.

Usage#

When validating an ID token signature:

  1. 1

    Decode the ID token header to get the kid (key ID)

  2. 2

    Fetch the JWKS from this endpoint

  3. 3

    Find the key with the matching kid

  4. 4

    Use the public key to verify the signature

Notes#

  • ID Check uses ES256 (ECDSA with P-256 curve) for signing ID tokens
  • The signing key is separate from the encryption key. ID Check encrypts each ID token with the RSA key in the client's JWKS that has use set to enc. See Encryption key
  • Always match keys by kid. Do not assume key order or count

Was this page helpful?