Skip to main content
Developer

Authentication#

View as Markdown
On this page

ID Check requires client authentication using signed JSON Web Tokens (JWTs), compliant with the FAPI 2.0 Security Profile.

Overview#

All requests to the pushed authorisation request (PAR) and token endpoints must include:

  1. 1

    Client assertion - A signed JWT that authenticates the client

  2. 2

    Client assertion type - Set to urn:ietf:params:oauth:client-assertion-type:jwt-bearer

Supported algorithms#

ID Check supports the following signing algorithms (FAPI 2.0 compliant):

AlgorithmKey typeDescription
ES256EC (P-256)ECDSA using P-256 and SHA-256
PS256RSARSASSA-PSS using SHA-256
EdDSAOKP (Ed25519)Edwards-curve Digital Signature Algorithm

Client assertion JWT#

The client assertion authenticates the client to ID Check.

The JWT header must contain alg and kid. The typ claim is optional but must be JWT if present.

ClaimRequiredDescription
algYesAlgorithm (ES256, PS256, or EdDSA)
kidYesKey ID matching the client's registered JSON Web Key Set (JWKS)
typNoIf present, must be JWT

Example header:

{
  "alg": "ES256",
  "kid": "my-signing-key-1",
  "typ": "JWT"
}

Payload#

The JWT payload must contain these required claims:

ClaimRequiredDescription
issYesIssuer - must be the client_id
subYesSubject - must be the client_id
audYesAudience - ID Check base URL
expYesExpiration time (Unix timestamp)

The payload can also contain the following optional claims:

ClaimDescription
iatIssued at time (Unix timestamp)
jtiUnique JWT identifier
nbfNot before time (Unix timestamp)

Example payload:

{
  "iss": "dip_aci_your_client_id",
  "sub": "dip_aci_your_client_id",
  "aud": "https://{base-url}",
  "exp": 1759835872
}

JWKS registration#

The client publishes its public keys as a JWKS (RFC 7517⁠ (opens in a new tab)) at a URL. Stø registers the URL for the client, and ID Check fetches the keys from it. The JWKS must hold the signing keys of the client and an encryption key for the ID token.

Required JWK fields#

Each signing key needs these fields:

FieldRequiredDescription
ktyYesKey type (EC, RSA, or OKP)
algYesAlgorithm (ES256, PS256, or EdDSA)
useYesMust be sig
kidYesUnique key identifier

EC key (P-256) fields#

FieldDescription
crvCurve name (P-256)
xX coordinate (Base64url)
yY coordinate (Base64url)

RSA key fields#

FieldDescription
nModulus (Base64url)
eExponent (Base64url)

OKP key (Ed25519) fields#

FieldDescription
crvCurve name (Ed25519)
xPublic key (Base64url)

Encryption key#

ID Check encrypts each ID token with RSA-OAEP-256 and A256GCM. It uses the RSA public key in the client's JWKS that has use set to enc. Give this key kty RSA, use enc and alg RSA-OAEP-256, and the RSA key fields above. If the JWKS has no encryption key, the PAR endpoint returns not_found.

Key rotation#

ID Check fetches the client's public keys from the JWKS URI registered for the client. To rotate keys:

  1. 1

    Generate a new keypair

  2. 2

    Add the new public key to the client's JWKS endpoint

  3. 3

    Start using the new key (reference via kid)

  4. 4

    After a transition period, remove the old key from the client's JWKS endpoint

Was this page helpful?