Configuration for creating the PAR
The identifier of the Credential Issuer (used as JWT aud claim)
Fine-grained authorization requirements using JSON data structures
Authorization Server metadata for conditional JAR signing
When true, creates a signed JAR. When false, creates an unsigned authorization request.
Defaults to false if not provided (permissive).
Cryptographic callback functions (generateRandom, hash, signJwt)
Thumbprint of the jwk value in the cnf parameter inside Wallet Attestation
Supported code challenge methods from Authorization Server
DPoP signer options (alg, publicJwk.kid). Required when JAR signing is enabled; omitted for unsigned requests
Optional JWT ID for PAR (auto-generated if not provided)
Optional PKCE code verifier (auto-generated if not provided)
Redirect URI for the authorization response
Italian Wallet specification version used to build the request shape
Response mode (v1.0 only, must be supported by Credential Issuer)
OAuth 2.0 scope to request
Optional state parameter (auto-generated if not provided)
Optional JWT expiration time (defaults to 1 hour from issuedAt)
Optional JWT issued at time (defaults to current time)
A promise resolving to either:
PushedAuthorizationRequestSigned when JAR signing is required (contains request JWT)authorizationRequest object)// Example 1: Create signed PAR for IT-Wallet v1.0 (explicit)
const config = new IoWalletSdkConfig({
itWalletSpecsVersion: ItWalletSpecsVersion.V1_0,
});
const signedPar = await createPushedAuthorizationRequest({
audience: 'https://issuer.example.com',
callbacks: { generateRandom, hash, signJwt },
clientId: 'wallet_client_thumbprint',
codeChallengeMethodsSupported: ['S256'],
config,
dpop: { signer: { alg: 'ES256', publicJwk: { kid: 'key-1' } } },
redirectUri: 'https://wallet.example.com/callback',
responseMode: 'form_post.jwt',
scope: 'openid',
authorizationServerMetadata: {
require_signed_request_object: true // Creates signed JAR
}
});
// signedPar.request contains the signed JWT
// Example 2: Create unsigned PAR for IT-Wallet v1.3 (when Authorization Server allows it)
const config = new IoWalletSdkConfig({
itWalletSpecsVersion: ItWalletSpecsVersion.V1_3,
});
const unsignedPar = await createPushedAuthorizationRequest({
audience: 'https://issuer.example.com',
callbacks: { generateRandom, hash, signJwt },
clientId: 'wallet_client_thumbprint',
codeChallengeMethodsSupported: ['S256'],
config,
redirectUri: 'https://wallet.example.com/callback',
scope: 'openid',
authorizationServerMetadata: {
require_signed_request_object: false // Creates unsigned request — dpop not needed
}
});
// unsignedPar.authorizationRequest contains the plain object
// Example 3: Default behavior for IT-Wallet v1.0 (no metadata - unsigned)
const config = new IoWalletSdkConfig({
itWalletSpecsVersion: ItWalletSpecsVersion.V1_0,
});
const par = await createPushedAuthorizationRequest({
audience: 'https://issuer.example.com',
callbacks: { generateRandom, hash, signJwt },
clientId: 'wallet_client_thumbprint',
codeChallengeMethodsSupported: ['S256'],
config,
redirectUri: 'https://wallet.example.com/callback',
responseMode: 'form_post.jwt',
scope: 'openid'
// No authorizationServerMetadata — defaults to unsigned, dpop not needed
});
// par.authorizationRequest contains the plain object (permissive default)
Creates a Pushed Authorization Request (PAR) for OAuth 2.0 authorization flows.
This function conditionally creates signed JWT-Secured Authorization Requests (JAR)
based on the Authorization Server's require_signed_request_object metadata parameter
as defined in RFC 9101. The signing behavior enables compliance with both OAuth 2.0 PAR
(RFC 9126) and IT-Wallet v1.3.3 specifications.
Conditional JAR Signing:
require_signed_request_object is true: Creates a signed JARrequire_signed_request_object is false: Creates an unsigned authorization requestSecurity Note:
Disabling JAR signing (setting require_signed_request_object: false) should only be done
when the Authorization Server explicitly supports and allows unsigned requests. Signed
requests provide protection against request tampering and replay attacks.
Configuration for creating the PAR
The identifier of the Credential Issuer (used as JWT aud claim)
Fine-grained authorization requirements using JSON data structures
Authorization Server metadata for conditional JAR signing
When true, creates a signed JAR. When false, creates an unsigned authorization request.
Defaults to false if not provided (permissive).
Cryptographic callback functions (generateRandom, hash, signJwt)
Thumbprint of the jwk value in the cnf parameter inside Wallet Attestation
Supported code challenge methods from Authorization Server
DPoP signer options (alg, publicJwk.kid). Required when JAR signing is enabled; omitted for unsigned requests
Optional JWT ID for PAR (auto-generated if not provided)
Optional PKCE code verifier (auto-generated if not provided)
Redirect URI for the authorization response
Italian Wallet specification version used to build the request shape
Response mode (v1.0 only, must be supported by Credential Issuer)
OAuth 2.0 scope to request
Optional state parameter (auto-generated if not provided)
Optional JWT expiration time (defaults to 1 hour from issuedAt)
Optional JWT issued at time (defaults to current time)
A promise resolving to either:
PushedAuthorizationRequestSigned when JAR signing is required (contains request JWT)authorizationRequest object)// Example 1: Create signed PAR for IT-Wallet v1.0 (explicit)
const config = new IoWalletSdkConfig({
itWalletSpecsVersion: ItWalletSpecsVersion.V1_0,
});
const signedPar = await createPushedAuthorizationRequest({
audience: 'https://issuer.example.com',
callbacks: { generateRandom, hash, signJwt },
clientId: 'wallet_client_thumbprint',
codeChallengeMethodsSupported: ['S256'],
config,
dpop: { signer: { alg: 'ES256', publicJwk: { kid: 'key-1' } } },
redirectUri: 'https://wallet.example.com/callback',
responseMode: 'form_post.jwt',
scope: 'openid',
authorizationServerMetadata: {
require_signed_request_object: true // Creates signed JAR
}
});
// signedPar.request contains the signed JWT
// Example 2: Create unsigned PAR for IT-Wallet v1.3 (when Authorization Server allows it)
const config = new IoWalletSdkConfig({
itWalletSpecsVersion: ItWalletSpecsVersion.V1_3,
});
const unsignedPar = await createPushedAuthorizationRequest({
audience: 'https://issuer.example.com',
callbacks: { generateRandom, hash, signJwt },
clientId: 'wallet_client_thumbprint',
codeChallengeMethodsSupported: ['S256'],
config,
redirectUri: 'https://wallet.example.com/callback',
scope: 'openid',
authorizationServerMetadata: {
require_signed_request_object: false // Creates unsigned request — dpop not needed
}
});
// unsignedPar.authorizationRequest contains the plain object
// Example 3: Default behavior for IT-Wallet v1.0 (no metadata - unsigned)
const config = new IoWalletSdkConfig({
itWalletSpecsVersion: ItWalletSpecsVersion.V1_0,
});
const par = await createPushedAuthorizationRequest({
audience: 'https://issuer.example.com',
callbacks: { generateRandom, hash, signJwt },
clientId: 'wallet_client_thumbprint',
codeChallengeMethodsSupported: ['S256'],
config,
redirectUri: 'https://wallet.example.com/callback',
responseMode: 'form_post.jwt',
scope: 'openid'
// No authorizationServerMetadata — defaults to unsigned, dpop not needed
});
// par.authorizationRequest contains the plain object (permissive default)
Creates a Pushed Authorization Request (PAR) for OAuth 2.0 authorization flows.
This function conditionally creates signed JWT-Secured Authorization Requests (JAR)
based on the Authorization Server's require_signed_request_object metadata parameter
as defined in RFC 9101. The signing behavior enables compliance with both OAuth 2.0 PAR
(RFC 9126) and IT-Wallet v1.3.3 specifications.
Conditional JAR Signing:
require_signed_request_object is true: Creates a signed JARrequire_signed_request_object is false: Creates an unsigned authorization requestSecurity Note:
Disabling JAR signing (setting require_signed_request_object: false) should only be done
when the Authorization Server explicitly supports and allows unsigned requests. Signed
requests provide protection against request tampering and replay attacks.
Configuration for creating the PAR
It MUST be set to the identifier of the Credential Issuer.
Optionalauthorization_details?: (Allows clients to specify their fine-grained authorization requirements using the expressiveness of JSON data structures
OptionalauthorizationServerMetadata?: { require_signed_request_object?: boolean }Authorization Server metadata for conditional JAR signing. When require_signed_request_object is true, creates a signed JWT (JAR). When require_signed_request_object is false, creates an unsigned authorization request. Defaults to false (unsigned) if not provided.
Callback context mostly for crypto related functionality
MUST be set to the thumbprint of the jwk value in the cnf parameter inside the Wallet Attestation.
Optionaldpop?: RequestDpopOptionsDPoP options. Required when require_signed_request_object is true
(enforced at the type level via function overloads). Not used in the
unsigned path and can be omitted.
OptionalexpiresAt?: DateExpiration time of the JWT. If not provided 1 hour will be added to the issuedAt
OptionalissuedAt?: DateCreation time of the JWT. If not provided the current date will be used
OptionalissuerState?: stringOptional issuer state from the Credential Offer authorization_code grant. Serialized as issuer_state in the authorization request.
Optionaljti?: stringjti parameter to use for PAR. If not provided a value will generated automatically
OptionalpkceCodeVerifier?: stringCode verifier to use for pkce. If not provided a value will generated when pkce is supported
Redirect uri to include in the authorization request
It MUST be one of the supported values (response_modes_supported) provided in the metadata of the Credential Issuer.
Optionalscope?: stringScope to request for the authorization request
Optionalstate?: stringstate parameter to use for PAR. If not provided a value will generated automatically
A promise resolving to either:
PushedAuthorizationRequestSigned when JAR signing is required (contains request JWT)authorizationRequest object)// Example 1: Create signed PAR for IT-Wallet v1.0 (explicit)
const config = new IoWalletSdkConfig({
itWalletSpecsVersion: ItWalletSpecsVersion.V1_0,
});
const signedPar = await createPushedAuthorizationRequest({
audience: 'https://issuer.example.com',
callbacks: { generateRandom, hash, signJwt },
clientId: 'wallet_client_thumbprint',
codeChallengeMethodsSupported: ['S256'],
config,
dpop: { signer: { alg: 'ES256', publicJwk: { kid: 'key-1' } } },
redirectUri: 'https://wallet.example.com/callback',
responseMode: 'form_post.jwt',
scope: 'openid',
authorizationServerMetadata: {
require_signed_request_object: true // Creates signed JAR
}
});
// signedPar.request contains the signed JWT
// Example 2: Create unsigned PAR for IT-Wallet v1.3 (when Authorization Server allows it)
const config = new IoWalletSdkConfig({
itWalletSpecsVersion: ItWalletSpecsVersion.V1_3,
});
const unsignedPar = await createPushedAuthorizationRequest({
audience: 'https://issuer.example.com',
callbacks: { generateRandom, hash, signJwt },
clientId: 'wallet_client_thumbprint',
codeChallengeMethodsSupported: ['S256'],
config,
redirectUri: 'https://wallet.example.com/callback',
scope: 'openid',
authorizationServerMetadata: {
require_signed_request_object: false // Creates unsigned request — dpop not needed
}
});
// unsignedPar.authorizationRequest contains the plain object
// Example 3: Default behavior for IT-Wallet v1.0 (no metadata - unsigned)
const config = new IoWalletSdkConfig({
itWalletSpecsVersion: ItWalletSpecsVersion.V1_0,
});
const par = await createPushedAuthorizationRequest({
audience: 'https://issuer.example.com',
callbacks: { generateRandom, hash, signJwt },
clientId: 'wallet_client_thumbprint',
codeChallengeMethodsSupported: ['S256'],
config,
redirectUri: 'https://wallet.example.com/callback',
responseMode: 'form_post.jwt',
scope: 'openid'
// No authorizationServerMetadata — defaults to unsigned, dpop not needed
});
// par.authorizationRequest contains the plain object (permissive default)
Creates a Pushed Authorization Request (PAR) for OAuth 2.0 authorization flows.
This function conditionally creates signed JWT-Secured Authorization Requests (JAR)
based on the Authorization Server's require_signed_request_object metadata parameter
as defined in RFC 9101. The signing behavior enables compliance with both OAuth 2.0 PAR
(RFC 9126) and IT-Wallet v1.3.3 specifications.
Conditional JAR Signing:
require_signed_request_object is true: Creates a signed JARrequire_signed_request_object is false: Creates an unsigned authorization requestSecurity Note:
Disabling JAR signing (setting require_signed_request_object: false) should only be done
when the Authorization Server explicitly supports and allows unsigned requests. Signed
requests provide protection against request tampering and replay attacks.
Configuration for creating the PAR
The identifier of the Credential Issuer (used as JWT aud claim)
Fine-grained authorization requirements using JSON data structures
Authorization Server metadata for conditional JAR signing
When true, creates a signed JAR. When false, creates an unsigned authorization request.
Defaults to false if not provided (permissive).
Cryptographic callback functions (generateRandom, hash, signJwt)
Thumbprint of the jwk value in the cnf parameter inside Wallet Attestation
Supported code challenge methods from Authorization Server
DPoP signer options (alg, publicJwk.kid). Required when JAR signing is enabled; omitted for unsigned requests
Optional JWT ID for PAR (auto-generated if not provided)
Optional PKCE code verifier (auto-generated if not provided)
Redirect URI for the authorization response
Italian Wallet specification version used to build the request shape
Response mode (v1.0 only, must be supported by Credential Issuer)
OAuth 2.0 scope to request
Optional state parameter (auto-generated if not provided)
Optional JWT expiration time (defaults to 1 hour from issuedAt)
Optional JWT issued at time (defaults to current time)
The identifier of the Credential Issuer (used as JWT aud claim)
Fine-grained authorization requirements using JSON data structures
Authorization Server metadata for conditional JAR signing
When true, creates a signed JAR. When false, creates an unsigned authorization request.
Defaults to false if not provided (permissive).
Cryptographic callback functions (generateRandom, hash, signJwt)
Thumbprint of the jwk value in the cnf parameter inside Wallet Attestation
Supported code challenge methods from Authorization Server
DPoP signer options (alg, publicJwk.kid). Required when JAR signing is enabled; omitted for unsigned requests
Optional JWT ID for PAR (auto-generated if not provided)
Optional PKCE code verifier (auto-generated if not provided)
Redirect URI for the authorization response
Italian Wallet specification version used to build the request shape
Response mode (v1.0 only, must be supported by Credential Issuer)
OAuth 2.0 scope to request
Optional state parameter (auto-generated if not provided)
Optional JWT expiration time (defaults to 1 hour from issuedAt)
Optional JWT issued at time (defaults to current time)
A promise resolving to either:
PushedAuthorizationRequestSigned when JAR signing is required (contains request JWT)authorizationRequest object)// Example 1: Create signed PAR for IT-Wallet v1.0 (explicit)
const config = new IoWalletSdkConfig({
itWalletSpecsVersion: ItWalletSpecsVersion.V1_0,
});
const signedPar = await createPushedAuthorizationRequest({
audience: 'https://issuer.example.com',
callbacks: { generateRandom, hash, signJwt },
clientId: 'wallet_client_thumbprint',
codeChallengeMethodsSupported: ['S256'],
config,
dpop: { signer: { alg: 'ES256', publicJwk: { kid: 'key-1' } } },
redirectUri: 'https://wallet.example.com/callback',
responseMode: 'form_post.jwt',
scope: 'openid',
authorizationServerMetadata: {
require_signed_request_object: true // Creates signed JAR
}
});
// signedPar.request contains the signed JWT
// Example 2: Create unsigned PAR for IT-Wallet v1.3 (when Authorization Server allows it)
const config = new IoWalletSdkConfig({
itWalletSpecsVersion: ItWalletSpecsVersion.V1_3,
});
const unsignedPar = await createPushedAuthorizationRequest({
audience: 'https://issuer.example.com',
callbacks: { generateRandom, hash, signJwt },
clientId: 'wallet_client_thumbprint',
codeChallengeMethodsSupported: ['S256'],
config,
redirectUri: 'https://wallet.example.com/callback',
scope: 'openid',
authorizationServerMetadata: {
require_signed_request_object: false // Creates unsigned request — dpop not needed
}
});
// unsignedPar.authorizationRequest contains the plain object
// Example 3: Default behavior for IT-Wallet v1.0 (no metadata - unsigned)
const config = new IoWalletSdkConfig({
itWalletSpecsVersion: ItWalletSpecsVersion.V1_0,
});
const par = await createPushedAuthorizationRequest({
audience: 'https://issuer.example.com',
callbacks: { generateRandom, hash, signJwt },
clientId: 'wallet_client_thumbprint',
codeChallengeMethodsSupported: ['S256'],
config,
redirectUri: 'https://wallet.example.com/callback',
responseMode: 'form_post.jwt',
scope: 'openid'
// No authorizationServerMetadata — defaults to unsigned, dpop not needed
});
// par.authorizationRequest contains the plain object (permissive default)
Creates a Pushed Authorization Request (PAR) for OAuth 2.0 authorization flows.
This function conditionally creates signed JWT-Secured Authorization Requests (JAR)
based on the Authorization Server's require_signed_request_object metadata parameter
as defined in RFC 9101. The signing behavior enables compliance with both OAuth 2.0 PAR
(RFC 9126) and IT-Wallet v1.3.3 specifications.
Conditional JAR Signing:
require_signed_request_object is true: Creates a signed JARrequire_signed_request_object is false: Creates an unsigned authorization requestSecurity Note:
Disabling JAR signing (setting require_signed_request_object: false) should only be done
when the Authorization Server explicitly supports and allows unsigned requests. Signed
requests provide protection against request tampering and replay attacks.
Configuration for creating the PAR
A promise resolving to either:
PushedAuthorizationRequestSigned when JAR signing is required (contains request JWT)authorizationRequest object)// Example 1: Create signed PAR for IT-Wallet v1.0 (explicit)
const config = new IoWalletSdkConfig({
itWalletSpecsVersion: ItWalletSpecsVersion.V1_0,
});
const signedPar = await createPushedAuthorizationRequest({
audience: 'https://issuer.example.com',
callbacks: { generateRandom, hash, signJwt },
clientId: 'wallet_client_thumbprint',
codeChallengeMethodsSupported: ['S256'],
config,
dpop: { signer: { alg: 'ES256', publicJwk: { kid: 'key-1' } } },
redirectUri: 'https://wallet.example.com/callback',
responseMode: 'form_post.jwt',
scope: 'openid',
authorizationServerMetadata: {
require_signed_request_object: true // Creates signed JAR
}
});
// signedPar.request contains the signed JWT
// Example 2: Create unsigned PAR for IT-Wallet v1.3 (when Authorization Server allows it)
const config = new IoWalletSdkConfig({
itWalletSpecsVersion: ItWalletSpecsVersion.V1_3,
});
const unsignedPar = await createPushedAuthorizationRequest({
audience: 'https://issuer.example.com',
callbacks: { generateRandom, hash, signJwt },
clientId: 'wallet_client_thumbprint',
codeChallengeMethodsSupported: ['S256'],
config,
redirectUri: 'https://wallet.example.com/callback',
scope: 'openid',
authorizationServerMetadata: {
require_signed_request_object: false // Creates unsigned request — dpop not needed
}
});
// unsignedPar.authorizationRequest contains the plain object
// Example 3: Default behavior for IT-Wallet v1.0 (no metadata - unsigned)
const config = new IoWalletSdkConfig({
itWalletSpecsVersion: ItWalletSpecsVersion.V1_0,
});
const par = await createPushedAuthorizationRequest({
audience: 'https://issuer.example.com',
callbacks: { generateRandom, hash, signJwt },
clientId: 'wallet_client_thumbprint',
codeChallengeMethodsSupported: ['S256'],
config,
redirectUri: 'https://wallet.example.com/callback',
responseMode: 'form_post.jwt',
scope: 'openid'
// No authorizationServerMetadata — defaults to unsigned, dpop not needed
});
// par.authorizationRequest contains the plain object (permissive default)
Creates a Pushed Authorization Request (PAR) for OAuth 2.0 authorization flows.
This function conditionally creates signed JWT-Secured Authorization Requests (JAR)
based on the Authorization Server's require_signed_request_object metadata parameter
as defined in RFC 9101. The signing behavior enables compliance with both OAuth 2.0 PAR
(RFC 9126) and IT-Wallet v1.3.3 specifications.
Conditional JAR Signing:
require_signed_request_object is true: Creates a signed JARrequire_signed_request_object is false: Creates an unsigned authorization requestSecurity Note:
Disabling JAR signing (setting require_signed_request_object: false) should only be done
when the Authorization Server explicitly supports and allows unsigned requests. Signed
requests provide protection against request tampering and replay attacks.
Configuration for creating the PAR
A promise resolving to either:
PushedAuthorizationRequestSigned when JAR signing is required (contains request JWT)authorizationRequest object)// Example 1: Create signed PAR for IT-Wallet v1.0 (explicit)
const config = new IoWalletSdkConfig({
itWalletSpecsVersion: ItWalletSpecsVersion.V1_0,
});
const signedPar = await createPushedAuthorizationRequest({
audience: 'https://issuer.example.com',
callbacks: { generateRandom, hash, signJwt },
clientId: 'wallet_client_thumbprint',
codeChallengeMethodsSupported: ['S256'],
config,
dpop: { signer: { alg: 'ES256', publicJwk: { kid: 'key-1' } } },
redirectUri: 'https://wallet.example.com/callback',
responseMode: 'form_post.jwt',
scope: 'openid',
authorizationServerMetadata: {
require_signed_request_object: true // Creates signed JAR
}
});
// signedPar.request contains the signed JWT
// Example 2: Create unsigned PAR for IT-Wallet v1.3 (when Authorization Server allows it)
const config = new IoWalletSdkConfig({
itWalletSpecsVersion: ItWalletSpecsVersion.V1_3,
});
const unsignedPar = await createPushedAuthorizationRequest({
audience: 'https://issuer.example.com',
callbacks: { generateRandom, hash, signJwt },
clientId: 'wallet_client_thumbprint',
codeChallengeMethodsSupported: ['S256'],
config,
redirectUri: 'https://wallet.example.com/callback',
scope: 'openid',
authorizationServerMetadata: {
require_signed_request_object: false // Creates unsigned request — dpop not needed
}
});
// unsignedPar.authorizationRequest contains the plain object
// Example 3: Default behavior for IT-Wallet v1.0 (no metadata - unsigned)
const config = new IoWalletSdkConfig({
itWalletSpecsVersion: ItWalletSpecsVersion.V1_0,
});
const par = await createPushedAuthorizationRequest({
audience: 'https://issuer.example.com',
callbacks: { generateRandom, hash, signJwt },
clientId: 'wallet_client_thumbprint',
codeChallengeMethodsSupported: ['S256'],
config,
redirectUri: 'https://wallet.example.com/callback',
responseMode: 'form_post.jwt',
scope: 'openid'
// No authorizationServerMetadata — defaults to unsigned, dpop not needed
});
// par.authorizationRequest contains the plain object (permissive default)
Creates a Pushed Authorization Request (PAR) for OAuth 2.0 authorization flows.
This function conditionally creates signed JWT-Secured Authorization Requests (JAR) based on the Authorization Server's
require_signed_request_objectmetadata parameter as defined in RFC 9101. The signing behavior enables compliance with both OAuth 2.0 PAR (RFC 9126) and IT-Wallet v1.3.3 specifications.Conditional JAR Signing:
require_signed_request_objectistrue: Creates a signed JARrequire_signed_request_objectisfalse: Creates an unsigned authorization requestSecurity Note: Disabling JAR signing (setting
require_signed_request_object: false) should only be done when the Authorization Server explicitly supports and allows unsigned requests. Signed requests provide protection against request tampering and replay attacks.