Skip to main content
Developer

Pushed Authorization Request (PAR)#

View as Markdown
On this page

The PAR endpoint allows clients to push authorization request parameters directly to DIP before redirecting the user. This is required for all authorization flows.

Endpoint#

POST /par

Why PAR?#

  • Security: Sensitive parameters are sent server-to-server, not exposed in browser URLs
  • Integrity: Request parameters cannot be tampered with by the user
  • URL Length: Avoids URL length limitations for complex requests
  • FAPI Compliance: Required by FAPI 2.0 Security Profile

Request Format#

Headers#

Content-Type: application/x-www-form-urlencoded

Parameters#

ParameterRequiredTypeDescription
client_idYesstringYour OAuth client identifier
client_assertion_typeYesstringMust be urn:ietf:params:oauth:client-assertion-type:jwt-bearer
client_assertionYesstringSigned JWT for client authentication
requestYesstringSigned JWT containing authorization parameters

Example Request#

POST /par HTTP/1.1
Host: {dip-base-url}
Content-Type: application/x-www-form-urlencoded

client_id=dip_aci_your_client_id
&client_assertion_type=urn%3Aietf%3Aparams%3Aoauth%3Aclient-assertion-type%3Ajwt-bearer
&client_assertion=eyJhbGciOiJFUzI1NiIsImtpZCI6Im15LWtleSIsInR5cCI6IkpXVCJ9...
&request=eyJhbGciOiJFUzI1NiIsImtpZCI6Im15LWtleSIsInR5cCI6IkpXVCJ9...

Client Assertion JWT#

See Authentication for full details.

Header (3 claims exactly):

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

Payload (4 required claims, 3 optional):

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

Request Object JWT#

The request object contains all authorization parameters.

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

Payload Parameters#

ParameterRequiredTypeDescription
issYesstringMust be your client_id
subYesstringMust be your client_id
audYesstringDIP base URL
expYesnumberExpiration time (Unix timestamp)
client_idYesstringYour OAuth client identifier
response_typeYesstringMust be code
redirect_uriYesstringRegistered callback URL
scopeYesstringMust be openid
stateYesstringCSRF protection value
nonceYesstringReplay protection value
code_challengeYesstringPKCE code challenge (S256)
code_challenge_methodYesstringMust be S256
claimsYesobjectOIDC4IA claims request

Claims Parameter Structure#

The claims parameter defines which verified claims to request. You only need to include the document details fields and identity claims that you want to receive - omit any fields you don't need.

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

Note: Only include the document_details fields and claims that you need. For example, if you only need given_name and birthdate, only include those in the claims object. Similarly, if you only need the document type and expiry date, only include type and date_of_expiry in document_details.

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.

Trust Framework Values#

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

Evidence Types#

TypeDescription
documentPhysical identity document (passport, ID card)

Document Details Fields#

All fields use null to indicate they should be populated:

FieldTypeDescription
typestringDocument type (passport, idcard)
document_numberstringDocument identification number
date_of_issuancestringIssue date (ISO 8601: YYYY-MM-DD)
date_of_expirystringExpiry date (ISO 8601: YYYY-MM-DD)
issuernullIssuing authority details. Response contains country_code (ISO 3166-1 alpha-3) and 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.

Note: The fields requested, will only be included in the response if the data is available from the Document. For example, if you request date_of_issuance but this data is not available from the document, it will be omitted from the response.

Verified Claims Fields#

FieldTypeDescription
namestringFull name
given_namestringFirst name(s)
family_namestringLast name(s)
picturestringPortrait photo from identity document (data URI: data:image/jpeg;base64,...)
genderstringGender (male, female, unknown, unspecified)
birthdatestringDate of birth (ISO 8601: YYYY-MM-DD)
nationalitiesstring[]List of nationalities (ISO 3166-1 alpha-3)

Complete Request Object Example#

{
  "iss": "dip_aci_your_client_id",
  "sub": "dip_aci_your_client_id",
  "aud": "https://{dip-base-url}",
  "exp": 1759835872,
  "client_id": "dip_aci_your_client_id",
  "response_type": "code",
  "redirect_uri": "https://client.example.org/callback",
  "scope": "openid",
  "state": "af0ifjsldkj",
  "nonce": "n-0S6_WzA2Mj",
  "code_challenge": "E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM",
  "code_challenge_method": "S256",
  "claims": {
    "id_token": {
      "verified_claims": {
        "verification": {
          "trust_framework": { "value": "stoe" },
          "evidence": [
            {
              "type": {
                "value": "document"
              },
              "document_details": {
                "type": null,
                "document_number": null,
                "date_of_issuance": null,
                "date_of_expiry": null,
                "issuer": null,
                "personal_number": null
              }
            }
          ]
        },
        "claims": {
          "given_name": { "essential": true },
          "family_name": { "essential": true },
          "picture": { "essential": true },
          "gender": { "essential": true },
          "birthdate": { "essential": true },
          "nationalities": { "essential": true }
        }
      }
    }
  }
}

Response#

Success Response (201 Created)#

{
  "request_uri": "urn:ietf:params:oauth:request_uri:550e8400-e29b-41d4-a716-446655440000",
  "expires_in": 60
}
FieldTypeDescription
request_uristringURI to use in authorization request
expires_innumberLifetime in seconds (typically 60)

Error Response#

{
  "error": "invalid_request",
  "error_description": "Missing required parameter: client_id"
}

Error Codes#

ErrorHTTP StatusDescription
invalid_request400Missing or invalid parameters, invalid request object claims, scope errors, or signature verification failure
invalid_client401Client authentication failed (unknown client, key not found, or invalid JWK)
not_found404Encryption key not found for client
server_error500Internal server error

Using the Request URI#

After receiving the request_uri, redirect the user to the authorization endpoint:

GET https://{dip-base-url}/auth
  ?client_id=dip_aci_your_client_id
  &request_uri=urn:ietf:params:oauth:request_uri:550e8400-e29b-41d4-a716-446655440000

Next Steps#

Was this page helpful?