Skip to main content
Developer

OIDC4IA ID Token#

View as Markdown
On this page

The ID token returned by DIP follows the OIDC4IA (OpenID Connect for Identity Assurance) specification. It contains verified identity claims with evidence of how the identity was verified.

Token Format#

The ID token is returned as an encrypted JWT (JWE) containing a signed JWT.

LayerFormatAlgorithm
OuterJWERSA-OAEP-256 with A256GCM
InnerSigned JWTES256

Complete Token Structure#

After decryption and signature verification:

{
  "iss": "https://{dip-base-url}",
  "sub": "pairwise-hashed-subject-identifier",
  "aud": "dip_aci_your_client_id",
  "exp": 1759839472,
  "iat": 1759835872,
  "auth_time": 1759835872,
  "jti": "e29b7c1e-6b4a-4a3b-9b1a-2f6c8a7d5e10",
  "nonce": "n-0S6_WzA2Mj",
  "acr": "urn:bankid:idcheck",
  "amr": ["face", "user"],
  "verified_claims": {
    "verification": {
      "trust_framework": "stoe",
      "evidence": [
        {
          "type": "document",
          "document_details": {
            "type": "passport",
            "document_number": "AB1234567",
            "date_of_issuance": "2020-01-15",
            "date_of_expiry": "2030-01-15",
            "issuer": {
              "country_code": "NOR",
              "name": "INNLANDET POLITIDISTRIKT"
            },
            "personal_number": "12345678901"
          },
          "check_details": [
            {
              "check_method": "vcrypt",
              "result": "success"
            },
            {
              "check_method": "data",
              "organization": "id.politiet.no",
              "time": "2024-01-15T10:30:00Z",
              "result": "valid"
            }
          ]
        }
      ]
    },
    "claims": {
      "given_name": "AASAMUND SPECIMEN",
      "family_name": "OESTENBYEN",
      "picture": "data:image/jpeg;base64,/9j/4AAQSkZJRg...",
      "birthdate": "1990-01-15",
      "gender": "male",
      "nationalities": ["NOR"]
    }
  }
}

Standard OIDC Claims#

These claims are always present in the ID token:

ClaimTypeRequiredDescription
issstringYesIssuer identifier (DIP base URL)
substringYesPairwise subject identifier (unique per client)
audstringYesAudience (your client_id)
expnumberYesExpiration time (Unix timestamp)
iatnumberYesIssued at time (Unix timestamp)
auth_timenumberYesTime of authentication (Unix timestamp)
jtistringYesUnique identifier for this token (JWT ID). Can be used to detect replay or duplicate processing
noncestringYesNonce from authorization request
acrstringYesAuthentication Context Class Reference
amrstring[]YesAuthentication Methods References

Example Standard Claims#

{
  "iss": "https://{dip-base-url}",
  "sub": "a1b2c3d4e5f6g7h8i9j0",
  "aud": "dip_aci_your_client_id",
  "exp": 1759839472,
  "iat": 1759835872,
  "auth_time": 1759835872,
  "jti": "e29b7c1e-6b4a-4a3b-9b1a-2f6c8a7d5e10",
  "nonce": "n-0S6_WzA2Mj",
  "acr": "urn:bankid:idcheck",
  "amr": ["face", "user"]
}

ACR Values#

ValueDescription
urn:bankid:idcheckIdentity verified via document and facial recognition

AMR Values#

ValueDescription
faceFacial recognition performed
userUser interaction completed

Verified Claims Structure#

The verified_claims object contains identity data with verification evidence.

Top-Level Structure#

{
  "verified_claims": {
    "verification": { ... },
    "claims": { ... }
  }
}
FieldTypeDescription
verificationobjectHow the identity was verified
claimsobjectThe verified identity claims

Verification Object#

The verification object describes the trust framework and evidence used.

{
  "verification": {
    "trust_framework": "stoe",
    "evidence": [ ... ]
  }
}
FieldTypeDescription
trust_frameworkstringTrust framework identifier
evidencearrayList of evidence objects

Trust Framework Values#

ValueDescription
stoeStandard trust framework for identity verification
stoe_etsiETSI-compliant with stricter requirements. Requires given_name and family_name to be requested. Issuer check must be valid (only available for Norwegian documents).

Evidence Object#

Each evidence object describes one piece of verification evidence.

Note: Any requested evidence or claims that are not available in the ID check data will be omitted from the response. The response only contains data that was successfully retrieved.

Document Evidence#

{
  "type": "document",
  "document_details": {
    "type": "passport",
    "document_number": "AB1234567",
    "date_of_issuance": "2020-01-15",
    "date_of_expiry": "2030-01-15",
    "issuer": {
      "country_code": "NOR",
      "name": "INNLANDET POLITIDISTRIKT"
    },
    "personal_number": "12345678901"
  },
  "check_details": [
    {
      "check_method": "vcrypt",
      "result": "success"
    },
    {
      "check_method": "data",
      "organization": "id.politiet.no",
      "time": "2024-01-15T10:30:00Z",
      "result": "valid"
    }
  ]
}

Document Details Fields#

FieldTypeDescription
typestringDocument type
document_numberstringDocument identification number
date_of_issuancestringIssue date (ISO 8601: YYYY-MM-DD)
date_of_expirystringExpiry date (ISO 8601: YYYY-MM-DD)
issuerobjectIssuing authority details
issuer.country_codestringIssuing country (ISO 3166-1 alpha-3)
issuer.namestringIssuing authority name
personal_numberstringFor Norwegian documents, this is the fødselsnummer (NNIN). For non-Norwegian documents, this may contain a national identification number from the issuing country, or may be absent.

Document Type Values#

ValueDescription
passportPassport document
idcardNational ID card

Document Check Details#

The check_details array on document evidence provides OIDC4IA spec-aligned verification results. It is always included on document evidence.

{
  "check_details": [
    {
      "check_method": "vcrypt",
      "result": "success"
    },
    {
      "check_method": "data",
      "organization": "id.politiet.no",
      "time": "2024-01-15T10:30:00Z",
      "result": "valid"
    }
  ]
}
FieldTypeDescription
check_detailsarrayVerification checks performed on the document
check_details[].check_methodstringCheck method: vcrypt (cryptographic verification) or data (registry/issuer data check)
check_details[].resultstringResult of the check
check_details[].organizationstringAuthority that performed the check (data only)
check_details[].timestringISO 8601 timestamp of the check (data only)

vcrypt Check (Active Authentication)#

Cryptographic verification of the document chip.

ResultDescription
successDocument chip authentication successful
failedDocument chip authentication failed
not_applicableActive authentication not performed

data Check (Issuer Registry Verification)#

Verification against the issuing authority's registry. Only present for documents where an issuer check was performed (typically Norwegian documents).

ResultDescription
validDocument verified as valid by issuing authority
revokedDocument has been revoked

Verified Identity Claims#

The claims object contains the verified identity data.

{
  "claims": {
    "name": "AASAMUND SPECIMEN OESTENBYEN",
    "given_name": "AASAMUND SPECIMEN",
    "family_name": "OESTENBYEN",
    "picture": "data:image/jpeg;base64,/9j/4AAQSkZJRg...",
    "birthdate": "1990-01-15",
    "gender": "male",
    "nationalities": ["NOR"]
  }
}

Available Claims#

ClaimTypeDescription
namestringFull name
given_namestringFirst name(s)
family_namestringLast name(s)
picturestringPortrait photo from identity document (data URI: data:image/jpeg;base64,...)
birthdatestringDate of birth (ISO 8601: YYYY-MM-DD)
genderstringGender
nationalitiesstring[]List of nationalities

Gender Values#

ValueDescription
maleMale
femaleFemale
unknownUnknown gender
unspecifiedGender not specified

Nationality Format#

Nationalities are returned as ISO 3166-1 alpha-3 country codes:

CodeCountry
NORNorway
SWESweden
DNKDenmark
DEUGermany
etc.

Conditional Claims#

Claims are only included if:

  1. 1
    Requested in PAR

    The claim was included in the claims request (all claims must have essential: true — essential: false is rejected at PAR time)

  2. 2
    Available from source

    The ID Check service provided the data

  3. 3
    Consent given

    User consent was provided (if required)

If a requested claim is not available, it will be omitted from the response.

Trust Framework Requirements#

stoe (Standard)#

  • All available claims are included
  • Issuer check may be any value

stoe_etsi (ETSI)#

  • Stricter validation requirements
  • given_name and family_name must be requested as claims
  • Issuer check must be valid
  • If issuer check fails, an error is returned
  • Important: Since issuer check is only available for Norwegian documents, the stoe_etsi trust framework can only be used with Norwegian passports and ID cards

Token Validation#

Required Validations#

  1. 1

    Decrypt the JWE using your private key

  2. 2

    Verify the JWT signature using DIP's public key from /jwks

  3. 3
    Validate standard claims
ClaimValidation
issMust match DIP issuer URL
audMust match your client_id
expMust not be expired
iatMust not be in the future
nonceMust match your PAR request nonce

Optional Validations#

ClaimValidation
acrShould be urn:bankid:idcheck
amrShould contain expected methods
auth_timeShould be within acceptable timeframe
jtiTrack previously seen values to detect replay of the same token

Data Validation#

The checks above cover token integrity. In addition, you should validate that the identity data itself is acceptable for your use case and compliance requirements.

DIP applies filtering during the verification process to reject documents early and provide useful feedback to end users, but these checks may not cover all of your specific requirements. Examples of additional validations to consider:

CheckDescription
Issuer countryVerify that the document's issuer.country_code is from a country you accept
Document typeVerify that the document_details.type is acceptable for your use case
Document expiryApply your own policy for how close to expiry you accept documents
Check resultsEvaluate check_details results against your risk tolerance
Identity claimsValidate that the returned claims meet your business and compliance needs

As the Relying Party, you are responsible for your own compliance with applicable legislation, including verifying that the data you receive is sufficient for your purposes.

Complete Example#

Request (PAR claims parameter)#

{
  "id_token": {
    "verified_claims": {
      "verification": {
        "trust_framework": { "value": "stoe" },
        "evidence": [
          {
            "type": { "value": "document" },
            "document_details": {
              "type": null,
              "document_number": null,
              "date_of_expiry": null,
              "issuer": null,
              "personal_number": null
            }
          }
        ]
      },
      "claims": {
        "given_name": { "essential": true },
        "family_name": { "essential": true },
        "picture": { "essential": true },
        "birthdate": { "essential": true }
      }
    }
  }
}

Response (ID Token verified_claims)#

{
  "verified_claims": {
    "verification": {
      "trust_framework": "stoe",
      "evidence": [
        {
          "type": "document",
          "document_details": {
            "type": "passport",
            "document_number": "AB1234567",
            "date_of_expiry": "2030-01-15",
            "issuer": {
              "country_code": "NOR",
              "name": "INNLANDET POLITIDISTRIKT"
            },
            "personal_number": "12345678901"
          },
          "check_details": [
            {
              "check_method": "vcrypt",
              "result": "success"
            },
            {
              "check_method": "data",
              "organization": "id.politiet.no",
              "time": "2024-01-15T10:30:00Z",
              "result": "valid"
            }
          ]
        }
      ]
    },
    "claims": {
      "given_name": "AASAMUND SPECIMEN",
      "family_name": "OESTENBYEN",
      "picture": "data:image/jpeg;base64,/9j/4AAQSkZJRg...",
      "birthdate": "1990-01-15"
    }
  }
}

Note: Only requested fields are included in the response.

Next Steps#

  • PAR Request - How to request specific claims
  • Token Request - Token exchange endpoint
  • Authentication - JWT requirements

Was this page helpful?