Step 3: Signing Authorization
Hash Signing PAR Request
This request creates an authorization request bound to a specific signing credential, hash algorithm, and one or more document hashes.
HTTP Request
POST {{csc_base_url}}/oauth2/pushed_authorize
Authorization: Basic BASE64(client_id:client_secret)
Content-Type: application/x-www-form-urlencoded
response_type=code
client_id={{client_id}}
redirect_uri={{redirect_uri}}
scope=credential
state={{oauth_state}}
credentialID={{credential_id}}
numSignatures=1
hashes={{hash_base64}}
hashAlgorithmOID={{hash_algorithm_oid}}
acr_values={{acr_values}}
code_challenge_method=S256
code_challenge={{code_challenge}}
Input Parameters
| Parameter | Location | Required | Type/Format | Description |
|---|---|---|---|---|
Authorization | Header | Yes | HTTP Basic | OAuth client authentication |
response_type | Form | Yes | String | Static value code |
client_id | Form | Yes | String | OAuth client identifier |
redirect_uri | Form | Yes | URI | Registered callback URL |
scope | Form | Yes | String | Static value credential |
state | Form | Yes | String | New correlation/CSRF value for this signing attempt |
credentialID | Form | Yes | String | The signing credential to be used for signing |
numSignatures | Form | Yes | Positive Integer | Number of signatures; must match the number of hashes |
hashes | Form | Yes, if SCAL=2 | Standard Base64 values | Hashes to be signed; multiple values may be supplied according to the RSE format |
hashAlgorithmOID | Form | Yes | OID String | For SHA-384 use 2.16.840.1.101.3.4.2.2 |
acr_values | Form | Recommended | String | Restricts the authentication methods offered to the user. For this service, specify the eID Card and/or eID Scan authentication flows. Multiple values are separated by a pipe character | , URL-encoded as %7C`. |
code_challenge_method | Form | Yes | String | S256 |
code_challenge | Form | Yes | Base64URL without padding | Calculated from the new signing flow code_verifier |
The response structure is identical to the credential PAR request:
{
"request_uri": "urn:ietf:params:oauth:request_uri:<identifier>",
"expires_in": 60
}Create a new
authorize_urlfrom the returnedrequest_uriand perform signing approval in the browser.The callback
stateparameter must be validated against theoauth_stategenerated specifically for this signing flow.The request supports Single Sign-On (SSO). Therefore, user authentication is not required again if a valid authentication session already exists. However, signing approval is required for every signing operation.
Exchange the Signing Authorization Code for a Token
This request exchanges the authorization code received after signing approval for a short-lived Bearer token bound to the authorized hash values.
HTTP Request
POST {{csc_base_url}}/oauth2/token
Authorization: Basic BASE64(client_id:client_secret)
Content-Type: application/x-www-form-urlencoded
grant_type=authorization_code
client_id={{client_id}}
code={{authorization_code}}
redirect_uri={{redirect_uri}}
code_verifier={{code_verifier}}
Input Parameters
The input parameters are identical to those described in the Authorization Code Exchange section.
Use the new authorization_code received during the signing flow together with the code_verifier generated specifically for that signing flow, rather than the values used during the credential acquisition flow.
Response Example
{
"access_token": "<redacted>",
"token_type": "Bearer",
"expires_in": 120,
"authorization_details": [
{
"type": "digest_signing",
"digests": [
{
"value": "<SHA-384-hash-in-Base64>",
"algorithm": "SHA-384"
}
],
"sign_identity_id": "<credential-id>",
"num_signatures": 1
}
]
}
Response Parameters and Validation
| Parameter | Type | Description | Integrator Validation |
|---|---|---|---|
access_token | String | Bearer access token issued for this specific signing operation | Use immediately with signatures/signHash |
token_type | String | Token type | Expected value is Bearer |
expires_in | Number | Validity period in seconds | Do not use after expiration |
authorization_details[].type | String | Authorization type | Expected value is digest_signing |
authorization_details[].digests[].value | String | Authorized hash value in Base64 format | Must exactly match the hashes value submitted in the PAR request |
authorization_details[].digests[].algorithm | String | Hash algorithm name | Expected value for this profile is SHA-384 |
authorization_details[].sign_identity_id | String | Authorized signing credential identifier | Must match the intended credential_id |
authorization_details[].num_signatures | Number | Authorized number of signatures | Must match the PAR numSignatures value and the number of hashes |
Updated about 2 months ago