@pagopa/io-wallet-oauth2 2.0.0-apt → 2.0.0-launchpad
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +205 -368
- package/dist/index.d.ts +205 -368
- package/dist/index.js +340 -592
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +145 -401
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,33 +1,152 @@
|
|
|
1
1
|
import * as _pagopa_io_wallet_utils from '@pagopa/io-wallet-utils';
|
|
2
|
-
import {
|
|
2
|
+
import { CallbackContext, Jwk, JwtSigner, RequestLike, ItWalletSpecsVersion, IoWalletSdkConfig, JwtSignerJwk, JwtPayload, FetchHeaders, RequestDpopOptions, decodeJwt, JwtSignerWithJwk, ClientAuthenticationCallback as ClientAuthenticationCallback$1, ClientAuthenticationCallbackOptions as ClientAuthenticationCallbackOptions$1, JweEncryptor, Fetch, DecodeJwtResult, HttpMethod } from '@pagopa/io-wallet-utils';
|
|
3
3
|
import z$1, { z } from 'zod';
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
5
|
+
interface RetrieveAuthorizationCodeAccessTokenOptions {
|
|
6
|
+
/**
|
|
7
|
+
* Additional payload to include in the access token request. Items will be encoded and sent
|
|
8
|
+
* using x-www-form-urlencoded format. Nested items (JSON) will be stringified and url encoded.
|
|
9
|
+
*/
|
|
10
|
+
additionalRequestPayload?: Record<string, unknown>;
|
|
11
|
+
/**
|
|
12
|
+
* The authorization code
|
|
13
|
+
*/
|
|
14
|
+
authorizationCode: string;
|
|
15
|
+
/**
|
|
16
|
+
* Callbacks to use for requesting access token
|
|
17
|
+
*/
|
|
18
|
+
callbacks: Pick<CallbackContext, "clientAuthentication" | "fetch" | "generateRandom" | "hash" | "signJwt">;
|
|
19
|
+
/**
|
|
20
|
+
* PKCE Code verifier that was used in the authorization request.
|
|
21
|
+
*/
|
|
22
|
+
pkceCodeVerifier: string;
|
|
23
|
+
/**
|
|
24
|
+
* Redirect uri to include in the access token request.
|
|
25
|
+
* It MUST be set as in the Request Object.
|
|
26
|
+
*/
|
|
27
|
+
redirectUri: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Creates an OAuth 2.0 authorization-code access token request body.
|
|
31
|
+
*
|
|
32
|
+
* @param options - Access token request inputs.
|
|
33
|
+
* @param options.additionalRequestPayload - Extra form fields to include in the token request.
|
|
34
|
+
* @param options.authorizationCode - Authorization code received from the authorization response.
|
|
35
|
+
* @param options.pkceCodeVerifier - PKCE verifier associated with the authorization request.
|
|
36
|
+
* @param options.redirectUri - Redirect URI used in the authorization request.
|
|
37
|
+
* @returns URL-form-encodable authorization-code grant request data.
|
|
38
|
+
*/
|
|
39
|
+
declare const createTokenRequest: (options: RetrieveAuthorizationCodeAccessTokenOptions) => Promise<{
|
|
40
|
+
code: string;
|
|
41
|
+
code_verifier: string;
|
|
42
|
+
grant_type: "authorization_code";
|
|
43
|
+
redirect_uri: string;
|
|
44
|
+
}>;
|
|
45
|
+
|
|
46
|
+
interface CreateAccessTokenResponseOptions {
|
|
47
|
+
/**
|
|
48
|
+
* Additional claims copied into both the access token JWT payload and token
|
|
49
|
+
* response envelope.
|
|
50
|
+
*/
|
|
51
|
+
additionalPayload?: Record<string, unknown>;
|
|
52
|
+
/**
|
|
53
|
+
* Intended recipient of the access token (`aud` claim).
|
|
54
|
+
*/
|
|
55
|
+
audience: string;
|
|
56
|
+
/**
|
|
57
|
+
* Authorization server identifier (`iss` claim).
|
|
58
|
+
*/
|
|
59
|
+
authorizationServer: string;
|
|
60
|
+
/**
|
|
61
|
+
* Runtime callbacks used to generate random values, compute JWK thumbprints,
|
|
62
|
+
* and sign the access token JWT.
|
|
63
|
+
*/
|
|
64
|
+
callbacks: Pick<CallbackContext, "generateRandom" | "hash" | "signJwt">;
|
|
65
|
+
/**
|
|
66
|
+
* OAuth client identifier (`client_id` claim).
|
|
67
|
+
*/
|
|
68
|
+
clientId: string;
|
|
69
|
+
/**
|
|
70
|
+
* DPoP public key used to bind the access token (`cnf.jkt` claim).
|
|
71
|
+
*/
|
|
72
|
+
dpop?: {
|
|
73
|
+
jwk: Jwk;
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Access token lifetime in seconds, used for both `exp` and `expires_in`.
|
|
77
|
+
*/
|
|
78
|
+
expiresInSeconds: number;
|
|
79
|
+
/**
|
|
80
|
+
* Optional "not before" timestamp in epoch seconds (`nbf` claim).
|
|
81
|
+
*/
|
|
82
|
+
nbf?: number;
|
|
83
|
+
/**
|
|
84
|
+
* Reference time used for `iat` and `exp`. Defaults to current time.
|
|
85
|
+
*/
|
|
86
|
+
now?: Date;
|
|
87
|
+
/**
|
|
88
|
+
* Requests issuance of a DPoP-bound Refresh Token JWT by specifying its
|
|
89
|
+
* lifetime in seconds. The Refresh Token `exp` is set to `now +
|
|
90
|
+
* refreshTokenExpiresInSeconds` and must be later than the Access Token
|
|
91
|
+
* `exp` (`nbf` of the Refresh Token).
|
|
92
|
+
*
|
|
93
|
+
* Requires `tokenType` to be `DPoP` and `dpop` to be provided. Omit this
|
|
94
|
+
* option to keep the specification's optional Refresh Token behavior
|
|
95
|
+
* (e.g. Bearer-only PDND responses).
|
|
96
|
+
*/
|
|
97
|
+
refreshTokenExpiresInSeconds?: number;
|
|
98
|
+
/**
|
|
99
|
+
* Optional scope string included in both the access token JWT payload and token
|
|
100
|
+
* response envelope.
|
|
101
|
+
*/
|
|
102
|
+
scope?: string;
|
|
103
|
+
/**
|
|
104
|
+
* Signer used to produce the access token JWT.
|
|
105
|
+
*/
|
|
106
|
+
signer: JwtSigner;
|
|
107
|
+
/**
|
|
108
|
+
* Subject identifier represented by the access token (`sub` claim).
|
|
109
|
+
*/
|
|
110
|
+
subject: string;
|
|
111
|
+
/**
|
|
112
|
+
* Token type returned in the OAuth token response.
|
|
113
|
+
* NOTE: When using `Bearer` it is supposed to be used only for PDND Interoperability API, not for credential issuance flows.
|
|
114
|
+
*/
|
|
115
|
+
tokenType: "Bearer" | "DPoP";
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Creates an OAuth 2.0 access token response where `access_token` is a signed
|
|
119
|
+
* JWT access token profile (`typ=at+jwt`) and `token_type` is `DPoP` or `Bearer`.
|
|
120
|
+
*
|
|
121
|
+
* The JWT payload always includes `aud`, `iss`, `sub`, `client_id`, `iat`,
|
|
122
|
+
* `exp`, and a random `jti`. When `dpop` is provided, `cnf.jkt` is added using
|
|
123
|
+
* the SHA-256 JWK thumbprint.
|
|
124
|
+
*
|
|
125
|
+
* When `refreshTokenExpiresInSeconds` is provided, a DPoP-bound Refresh Token
|
|
126
|
+
* JWT (`typ=rt+jwt`) is generated, signed, and returned as `refresh_token`.
|
|
127
|
+
* Refresh Token issuance requires `tokenType` to be `DPoP` with a `dpop`
|
|
128
|
+
* public key, and results in `nbf` equal to the Access Token `exp` and `exp`
|
|
129
|
+
* later than that.
|
|
130
|
+
*
|
|
131
|
+
* @param options - Access token response creation options.
|
|
132
|
+
* @returns OAuth token response with a signed access token JWT, and a signed Refresh Token JWT when requested.
|
|
133
|
+
* @throws {CreateTokenResponseError} If DPoP binding is required but missing, if Refresh Token issuance is requested without a valid DPoP configuration or lifetime, if the signer has no resolvable `kid` for the Refresh Token, or if response creation otherwise fails, including validation failures from the generated JWT headers or payloads.
|
|
134
|
+
* @throws {ValidationError} If the generated JWT header or payload fails validation.
|
|
135
|
+
*/
|
|
136
|
+
declare function createAccessTokenResponse(options: CreateAccessTokenResponseOptions): Promise<{
|
|
137
|
+
[x: string]: unknown;
|
|
138
|
+
access_token: string;
|
|
139
|
+
token_type: "Bearer" | "DPoP";
|
|
140
|
+
authorization_details?: {
|
|
141
|
+
[x: string]: unknown;
|
|
142
|
+
type: "openid_credential";
|
|
143
|
+
credential_configuration_id?: string | undefined;
|
|
144
|
+
credential_identifiers?: string[] | undefined;
|
|
145
|
+
}[] | undefined;
|
|
146
|
+
expires_in?: number | undefined;
|
|
147
|
+
refresh_token?: string | undefined;
|
|
148
|
+
}>;
|
|
14
149
|
|
|
15
|
-
declare const zPreAuthorizedCodeTokenRequest: z.ZodObject<{
|
|
16
|
-
grant_type: z.ZodLiteral<"urn:ietf:params:oauth:grant-type:pre-authorized_code">;
|
|
17
|
-
"pre-authorized_code": z.ZodString;
|
|
18
|
-
tx_code: z.ZodOptional<z.ZodString>;
|
|
19
|
-
}, z.core.$strip>;
|
|
20
|
-
declare const zAuthorizationCodeTokenRequest: z.ZodObject<{
|
|
21
|
-
code: z.ZodString;
|
|
22
|
-
code_verifier: z.ZodString;
|
|
23
|
-
grant_type: z.ZodLiteral<"authorization_code">;
|
|
24
|
-
redirect_uri: z.ZodString;
|
|
25
|
-
}, z.core.$strip>;
|
|
26
|
-
declare const zRefreshTokenTokenRequest: z.ZodObject<{
|
|
27
|
-
grant_type: z.ZodLiteral<"refresh_token">;
|
|
28
|
-
refresh_token: z.ZodString;
|
|
29
|
-
scope: z.ZodOptional<z.ZodString>;
|
|
30
|
-
}, z.core.$strip>;
|
|
31
150
|
declare const zAccessTokenRequest: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
32
151
|
code: z.ZodString;
|
|
33
152
|
code_verifier: z.ZodString;
|
|
@@ -39,27 +158,9 @@ declare const zAccessTokenRequest: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
39
158
|
scope: z.ZodOptional<z.ZodString>;
|
|
40
159
|
}, z.core.$strip>], "grant_type">;
|
|
41
160
|
type AccessTokenRequest = z.infer<typeof zAccessTokenRequest>;
|
|
42
|
-
declare const zAccessTokenRequestAPTITUDE: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
43
|
-
code: z.ZodString;
|
|
44
|
-
code_verifier: z.ZodString;
|
|
45
|
-
grant_type: z.ZodLiteral<"authorization_code">;
|
|
46
|
-
redirect_uri: z.ZodString;
|
|
47
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
48
|
-
grant_type: z.ZodLiteral<"refresh_token">;
|
|
49
|
-
refresh_token: z.ZodString;
|
|
50
|
-
scope: z.ZodOptional<z.ZodString>;
|
|
51
|
-
}, z.core.$strip>, z.ZodObject<{
|
|
52
|
-
grant_type: z.ZodLiteral<"urn:ietf:params:oauth:grant-type:pre-authorized_code">;
|
|
53
|
-
"pre-authorized_code": z.ZodString;
|
|
54
|
-
tx_code: z.ZodOptional<z.ZodString>;
|
|
55
|
-
}, z.core.$strip>], "grant_type">;
|
|
56
|
-
type AccessTokenRequestAPTITUDE = z.infer<typeof zAccessTokenRequestAPTITUDE>;
|
|
57
161
|
type AuthorizationCodeGrantType = Extract<AccessTokenRequest, {
|
|
58
162
|
grant_type: "authorization_code";
|
|
59
163
|
}>;
|
|
60
|
-
type PreAuthorizedCodeGrantType = Extract<AccessTokenRequestAPTITUDE, {
|
|
61
|
-
grant_type: "urn:ietf:params:oauth:grant-type:pre-authorized_code";
|
|
62
|
-
}>;
|
|
63
164
|
type RefreshTokenGrantType = Extract<AccessTokenRequest, {
|
|
64
165
|
grant_type: "refresh_token";
|
|
65
166
|
}>;
|
|
@@ -188,213 +289,16 @@ declare const zRefreshTokenProfileJwtPayload: z.ZodObject<{
|
|
|
188
289
|
}, z.core.$loose>;
|
|
189
290
|
type RefreshTokenProfileJwtPayload = z.infer<typeof zRefreshTokenProfileJwtPayload>;
|
|
190
291
|
|
|
191
|
-
interface
|
|
192
|
-
/**
|
|
193
|
-
* Additional payload to include in the access token request. Items are encoded and sent
|
|
194
|
-
* using x-www-form-urlencoded format. Nested items (JSON) are stringified and url encoded.
|
|
195
|
-
* Can be used to include form fields such as client_id or authorization_details.
|
|
196
|
-
*/
|
|
197
|
-
additionalRequestPayload?: Record<string, unknown>;
|
|
198
|
-
config: IoWalletSdkConfig;
|
|
199
|
-
}
|
|
200
|
-
interface RetrieveAccessTokenOptionsAuthCode<V extends ItWalletSpecsVersion> extends BaseRetrieveAccessTokenOptions {
|
|
201
|
-
/**
|
|
202
|
-
* The authorization code
|
|
203
|
-
*/
|
|
204
|
-
authorizationCode: string;
|
|
205
|
-
config: IoWalletSdkConfig<V>;
|
|
206
|
-
/** The authorization_code grant type. */
|
|
207
|
-
grantType: AuthorizationCodeGrantIdentifier;
|
|
208
|
-
/**
|
|
209
|
-
* PKCE Code verifier that was used in the authorization request.
|
|
210
|
-
*/
|
|
211
|
-
pkceCodeVerifier: string;
|
|
212
|
-
/**
|
|
213
|
-
* Redirect uri to include in the access token request.
|
|
214
|
-
* It MUST be set as in the Request Object.
|
|
215
|
-
*/
|
|
216
|
-
redirectUri: string;
|
|
217
|
-
}
|
|
218
|
-
interface RetrieveAccessTokenOptionsPreAuthorizedCode extends BaseRetrieveAccessTokenOptions {
|
|
219
|
-
config: IoWalletSdkConfig<ItWalletSpecsVersion.APTITUDE>;
|
|
220
|
-
/** The pre_authorized_code grant type. */
|
|
221
|
-
grantType: PreAuthorizedCodeGrantIdentifier;
|
|
222
|
-
/** The pre-authorized code received in the credential offer. */
|
|
223
|
-
preAuthorizedCode: string;
|
|
224
|
-
/** Required when the credential offer contains a tx_code object. */
|
|
225
|
-
txCode?: string;
|
|
226
|
-
}
|
|
227
|
-
interface RetrieveAccessTokenOptionsRefreshToken<V extends ItWalletSpecsVersion> extends BaseRetrieveAccessTokenOptions {
|
|
228
|
-
config: IoWalletSdkConfig<V>;
|
|
229
|
-
/** The refresh_token grant type. */
|
|
230
|
-
grantType: RefreshTokenGrantIdentifier;
|
|
231
|
-
/** The refresh token received in the credential offer. */
|
|
232
|
-
refreshToken: string;
|
|
233
|
-
/** The refresh token OPTIONAL scope. */
|
|
234
|
-
scope?: string;
|
|
235
|
-
}
|
|
236
|
-
type RetrieveAccessTokenOptionsShared<V extends ItWalletSpecsVersion> = RetrieveAccessTokenOptionsAuthCode<V> | RetrieveAccessTokenOptionsRefreshToken<V>;
|
|
237
|
-
type RetrieveAccessTokenOptions = RetrieveAccessTokenOptionsShared<ItWalletSpecsVersion.V1_0 | ItWalletSpecsVersion.V1_3 | ItWalletSpecsVersion.V1_4>;
|
|
238
|
-
type RetrieveAccessTokenOptionsAPTITUDE = RetrieveAccessTokenOptionsPreAuthorizedCode | RetrieveAccessTokenOptionsShared<ItWalletSpecsVersion.APTITUDE>;
|
|
239
|
-
type CreateTokenRequestOptions = RetrieveAccessTokenOptions | RetrieveAccessTokenOptionsAPTITUDE;
|
|
240
|
-
type CreateTokenRequestReturnType = AuthorizationCodeGrantType | PreAuthorizedCodeGrantType | RefreshTokenGrantType;
|
|
241
|
-
declare const createTokenRequestV1_4: <V extends ItWalletSpecsVersion>(options: RetrieveAccessTokenOptionsShared<V>) => {
|
|
242
|
-
grant_type: "refresh_token";
|
|
243
|
-
refresh_token: string;
|
|
244
|
-
scope: string | undefined;
|
|
245
|
-
} | {
|
|
246
|
-
code: string;
|
|
247
|
-
code_verifier: string;
|
|
248
|
-
grant_type: "authorization_code";
|
|
249
|
-
redirect_uri: string;
|
|
250
|
-
};
|
|
251
|
-
declare function createTokenRequestAPTITUDE(options: RetrieveAccessTokenOptionsAPTITUDE): CreateTokenRequestReturnType;
|
|
252
|
-
/**
|
|
253
|
-
* Creates an authorization-code or pre-authorized_code access token request body.
|
|
254
|
-
*
|
|
255
|
-
* Authorization-code requests retain the existing default grant and require PKCE
|
|
256
|
-
* and a redirect URI.
|
|
257
|
-
*
|
|
258
|
-
* * * Version Differences:
|
|
259
|
-
* - v1.4: only support authorization_code grant type.
|
|
260
|
-
* - APTITUDE: add support for pre-authorized_code grant type. Pre Authorized
|
|
261
|
-
* requests use preAuthorizedCode and optional txCode, without PKCE or a redirect URI.
|
|
262
|
-
*
|
|
263
|
-
* @param options - Access token request inputs and version config.
|
|
264
|
-
* @param options.config - The IoWalletSdkConfig instance to use.
|
|
265
|
-
* @param options.grantType - The grant type to use.
|
|
266
|
-
* @param options.additionalRequestPayload - Extra form fields to include in the token request.
|
|
267
|
-
*
|
|
268
|
-
* **authorization_code grant type parameters:**
|
|
269
|
-
* @param options.authorizationCode - Authorization code received from the authorization response.
|
|
270
|
-
* @param options.pkceCodeVerifier - PKCE verifier associated with the authorization request.
|
|
271
|
-
* @param options.redirectUri - Redirect URI used in the authorization request.
|
|
272
|
-
*
|
|
273
|
-
* **refresh_token grant type parameters (APTITUDE only):**
|
|
274
|
-
* @param options.refreshToken - Refresh token.
|
|
275
|
-
* @param options.scope - The refresh token OPTIONAL scope.
|
|
276
|
-
*
|
|
277
|
-
* **pre-authorized_code grant type parameters (APTITUDE only):**
|
|
278
|
-
* @param options.preAuthorizedCode - Pre-authorized code received in the credential offer.
|
|
279
|
-
* @param options.txCode - Transaction code required when the credential offer contains a `tx_code` object.
|
|
280
|
-
*
|
|
281
|
-
* @returns URL-form-encodable grant request data.
|
|
282
|
-
*/
|
|
283
|
-
declare function createTokenRequest(options: RetrieveAccessTokenOptions): AuthorizationCodeGrantType | RefreshTokenGrantType;
|
|
284
|
-
declare function createTokenRequest(options: RetrieveAccessTokenOptionsAPTITUDE): AuthorizationCodeGrantType | PreAuthorizedCodeGrantType | RefreshTokenGrantType;
|
|
285
|
-
declare function createTokenRequest(options: CreateTokenRequestOptions): CreateTokenRequestReturnType;
|
|
286
|
-
|
|
287
|
-
interface CreateAccessTokenResponseOptions {
|
|
288
|
-
/**
|
|
289
|
-
* Additional claims copied into both the access token JWT payload and token
|
|
290
|
-
* response envelope.
|
|
291
|
-
*/
|
|
292
|
-
additionalPayload?: Record<string, unknown>;
|
|
293
|
-
/**
|
|
294
|
-
* Intended recipient of the access token (`aud` claim).
|
|
295
|
-
*/
|
|
296
|
-
audience: string;
|
|
297
|
-
/**
|
|
298
|
-
* Authorization server identifier (`iss` claim).
|
|
299
|
-
*/
|
|
300
|
-
authorizationServer: string;
|
|
301
|
-
/**
|
|
302
|
-
* Runtime callbacks used to generate random values, compute JWK thumbprints,
|
|
303
|
-
* and sign the access token JWT.
|
|
304
|
-
*/
|
|
305
|
-
callbacks: Pick<CallbackContext, "generateRandom" | "hash" | "signJwt">;
|
|
306
|
-
/**
|
|
307
|
-
* OAuth client identifier (`client_id` claim).
|
|
308
|
-
*/
|
|
309
|
-
clientId: string;
|
|
310
|
-
config: IoWalletSdkConfig;
|
|
311
|
-
/**
|
|
312
|
-
* DPoP public key used to bind the access token (`cnf.jkt` claim).
|
|
313
|
-
*/
|
|
314
|
-
dpop?: {
|
|
315
|
-
jwk: Jwk;
|
|
316
|
-
};
|
|
317
|
-
/**
|
|
318
|
-
* Access token lifetime in seconds, used for both `exp` and `expires_in`.
|
|
319
|
-
*/
|
|
320
|
-
expiresInSeconds: number;
|
|
321
|
-
/**
|
|
322
|
-
* Optional "not before" timestamp in epoch seconds (`nbf` claim).
|
|
323
|
-
*/
|
|
324
|
-
nbf?: number;
|
|
325
|
-
/**
|
|
326
|
-
* Reference time used for `iat` and `exp`. Defaults to current time.
|
|
327
|
-
*/
|
|
328
|
-
now?: Date;
|
|
329
|
-
/**
|
|
330
|
-
* Requests issuance of a DPoP-bound Refresh Token JWT by specifying its
|
|
331
|
-
* lifetime in seconds. The Refresh Token `exp` is set to `now +
|
|
332
|
-
* refreshTokenExpiresInSeconds` and must be later than the Access Token
|
|
333
|
-
* `exp` (`nbf` of the Refresh Token).
|
|
334
|
-
*
|
|
335
|
-
* Requires `tokenType` to be `DPoP` and `dpop` to be provided. Omit this
|
|
336
|
-
* option to keep the specification's optional Refresh Token behavior
|
|
337
|
-
* (e.g. Bearer-only PDND responses).
|
|
338
|
-
*/
|
|
339
|
-
refreshTokenExpiresInSeconds?: number;
|
|
340
|
-
/**
|
|
341
|
-
* Optional scope string included in both the access token JWT payload and token
|
|
342
|
-
* response envelope.
|
|
343
|
-
*/
|
|
344
|
-
scope?: string;
|
|
345
|
-
/**
|
|
346
|
-
* Signer used to produce the access token JWT.
|
|
347
|
-
*/
|
|
348
|
-
signer: JwtSigner;
|
|
349
|
-
/**
|
|
350
|
-
* Subject identifier represented by the access token (`sub` claim).
|
|
351
|
-
*/
|
|
352
|
-
subject: string;
|
|
353
|
-
/**
|
|
354
|
-
* Token type returned in the OAuth token response.
|
|
355
|
-
* NOTE: When using `Bearer` it is supposed to be used only for PDND Interoperability API, not for credential issuance flows.
|
|
356
|
-
*/
|
|
357
|
-
tokenType: "Bearer" | "DPoP";
|
|
358
|
-
}
|
|
359
|
-
/**
|
|
360
|
-
* Creates an OAuth 2.0 access token response where `access_token` is a signed
|
|
361
|
-
* JWT access token profile (`typ=at+jwt`) and `token_type` is `DPoP` or `Bearer`.
|
|
362
|
-
*
|
|
363
|
-
* The JWT payload always includes `aud`, `iss`, `sub`, `client_id`, `iat`,
|
|
364
|
-
* `exp`, and a random `jti`. When `dpop` is provided, `cnf.jkt` is added using
|
|
365
|
-
* the SHA-256 JWK thumbprint.
|
|
366
|
-
*
|
|
367
|
-
* When `refreshTokenExpiresInSeconds` is provided, a DPoP-bound Refresh Token
|
|
368
|
-
* JWT (`typ=rt+jwt`) is generated, signed, and returned as `refresh_token`.
|
|
369
|
-
* Refresh Token issuance requires `tokenType` to be `DPoP` with a `dpop`
|
|
370
|
-
* public key, and results in `nbf` equal to the Access Token `exp` and `exp`
|
|
371
|
-
* later than that.
|
|
372
|
-
*
|
|
373
|
-
* @param options - Access token response creation options and version config.
|
|
374
|
-
* @returns OAuth token response with a signed access token JWT, and a signed Refresh Token JWT when requested.
|
|
375
|
-
* @throws {CreateTokenResponseError} If DPoP binding is required but missing, if Refresh Token issuance is requested without a valid DPoP configuration or lifetime, if the signer has no resolvable `kid` for the Refresh Token, or if response creation otherwise fails, including validation failures from the generated JWT headers or payloads.
|
|
376
|
-
* @throws {ValidationError} If the generated JWT header or payload fails validation.
|
|
377
|
-
*/
|
|
378
|
-
declare function createAccessTokenResponse(options: CreateAccessTokenResponseOptions): Promise<{
|
|
379
|
-
[x: string]: unknown;
|
|
380
|
-
access_token: string;
|
|
381
|
-
token_type: "Bearer" | "DPoP";
|
|
382
|
-
authorization_details?: {
|
|
383
|
-
[x: string]: unknown;
|
|
384
|
-
type: "openid_credential";
|
|
385
|
-
credential_configuration_id?: string | undefined;
|
|
386
|
-
credential_identifiers?: string[] | undefined;
|
|
387
|
-
}[] | undefined;
|
|
388
|
-
expires_in?: number | undefined;
|
|
389
|
-
refresh_token?: string | undefined;
|
|
390
|
-
}>;
|
|
391
|
-
|
|
392
|
-
interface BaseFetchTokenResponseOptions {
|
|
292
|
+
interface FetchTokenResponseOptions {
|
|
393
293
|
/**
|
|
394
294
|
* The endpoint URL where the access token request will be sent
|
|
395
295
|
* This should be the authorization server's token endpoint
|
|
396
296
|
*/
|
|
397
297
|
accessTokenEndpoint: string;
|
|
298
|
+
/**
|
|
299
|
+
* The access token request payload
|
|
300
|
+
*/
|
|
301
|
+
accessTokenRequest: AccessTokenRequest;
|
|
398
302
|
/**
|
|
399
303
|
* Callbacks to use for requesting access token
|
|
400
304
|
*/
|
|
@@ -404,7 +308,6 @@ interface BaseFetchTokenResponseOptions {
|
|
|
404
308
|
* Used for OAuth-Client-Attestation-PoP header to prove possession of the client key
|
|
405
309
|
*/
|
|
406
310
|
clientAttestationDPoP: string;
|
|
407
|
-
config: IoWalletSdkConfig;
|
|
408
311
|
/**
|
|
409
312
|
* DPoP proof for the token request
|
|
410
313
|
*/
|
|
@@ -415,47 +318,33 @@ interface BaseFetchTokenResponseOptions {
|
|
|
415
318
|
*/
|
|
416
319
|
walletAttestation: string;
|
|
417
320
|
}
|
|
418
|
-
interface FetchTokenResponseOptionsShared<V extends ItWalletSpecsVersion = ItWalletSpecsVersion.V1_0 | ItWalletSpecsVersion.V1_3 | ItWalletSpecsVersion.V1_4> extends BaseFetchTokenResponseOptions {
|
|
419
|
-
/**
|
|
420
|
-
* The authorization-code or refresh-token request payload.
|
|
421
|
-
*/
|
|
422
|
-
accessTokenRequest: AccessTokenRequest;
|
|
423
|
-
config: IoWalletSdkConfig<V>;
|
|
424
|
-
}
|
|
425
|
-
interface FetchTokenResponseOptionsAPTITUDE extends BaseFetchTokenResponseOptions {
|
|
426
|
-
/**
|
|
427
|
-
* The authorization-code, pre-authorized-code or refresh-token request payload.
|
|
428
|
-
*/
|
|
429
|
-
accessTokenRequest: AccessTokenRequestAPTITUDE;
|
|
430
|
-
config: IoWalletSdkConfig<ItWalletSpecsVersion.APTITUDE>;
|
|
431
|
-
}
|
|
432
|
-
type FetchTokenResponseOptions = FetchTokenResponseOptionsAPTITUDE | FetchTokenResponseOptionsShared;
|
|
433
|
-
/**
|
|
434
|
-
* Converts an access token request object into URL-encoded form parameters.
|
|
435
|
-
*
|
|
436
|
-
* Object values are JSON-stringified so structured extension parameters such as
|
|
437
|
-
* `authorization_details` can be sent in `application/x-www-form-urlencoded` requests.
|
|
438
|
-
*
|
|
439
|
-
* Version Differences:
|
|
440
|
-
* - APTITUDE: extracts `authorization_server` (OPTIONAL), `pre-authorized_code` (REQUIRED), and `tx_code` (OPTIONAL)
|
|
441
|
-
*
|
|
442
|
-
* @param data - Access token request payload.
|
|
443
|
-
* @returns URLSearchParams containing all defined request fields.
|
|
444
|
-
*/
|
|
445
|
-
declare function toURLSearchParams(data: FetchTokenResponseOptions["accessTokenRequest"]): URLSearchParams;
|
|
446
321
|
/**
|
|
447
322
|
* Sends an access token request to the authorization server and returns the response
|
|
448
323
|
*
|
|
449
|
-
*
|
|
450
|
-
* - APTITUDE: add support for pre-authorized-code grant type.
|
|
451
|
-
*
|
|
452
|
-
* @param options - Configuration options for the access token request and version config.
|
|
324
|
+
* @param options - Configuration options for the access token request
|
|
453
325
|
* @returns Promise that resolves to the parsed access token response
|
|
454
326
|
* @throws {UnexpectedStatusCodeError} When the server returns a non-200 status code
|
|
455
327
|
* @throws {ValidationError} When the response cannot be parsed as a valid access token response
|
|
456
328
|
* @throws {FetchTokenResponseError} When an unexpected error occurs during the request
|
|
457
329
|
*/
|
|
458
330
|
declare function fetchTokenResponse(options: FetchTokenResponseOptions): Promise<AccessTokenResponse>;
|
|
331
|
+
/**
|
|
332
|
+
* Converts an access token request object into URL-encoded form parameters.
|
|
333
|
+
*
|
|
334
|
+
* Object values are JSON-stringified so structured extension parameters such as
|
|
335
|
+
* `authorization_details` can be sent in `application/x-www-form-urlencoded` requests.
|
|
336
|
+
*
|
|
337
|
+
* @param data - Access token request payload.
|
|
338
|
+
* @returns URLSearchParams containing all defined request fields.
|
|
339
|
+
*/
|
|
340
|
+
declare function toURLSearchParams(data: AccessTokenRequest): URLSearchParams;
|
|
341
|
+
|
|
342
|
+
declare const zAuthorizationCodeGrantIdentifier: z.ZodLiteral<"authorization_code">;
|
|
343
|
+
declare const authorizationCodeGrantIdentifier: "authorization_code";
|
|
344
|
+
type AuthorizationCodeGrantIdentifier = z.infer<typeof zAuthorizationCodeGrantIdentifier>;
|
|
345
|
+
declare const zRefreshTokenGrantIdentifier: z.ZodLiteral<"refresh_token">;
|
|
346
|
+
declare const refreshTokenGrantIdentifier: "refresh_token";
|
|
347
|
+
type RefreshTokenGrantIdentifier = z.infer<typeof zRefreshTokenGrantIdentifier>;
|
|
459
348
|
|
|
460
349
|
interface ParsedAccessTokenAuthorizationCodeRequestGrant {
|
|
461
350
|
code: string;
|
|
@@ -465,14 +354,9 @@ interface ParsedAccessTokenRefreshTokenRequestGrant {
|
|
|
465
354
|
grantType: RefreshTokenGrantIdentifier;
|
|
466
355
|
refreshToken: string;
|
|
467
356
|
}
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
txCode?: string;
|
|
472
|
-
}
|
|
473
|
-
type ParsedAccessTokenRequestGrantV1_4 = ParsedAccessTokenAuthorizationCodeRequestGrant | ParsedAccessTokenRefreshTokenRequestGrant;
|
|
474
|
-
type ParsedAccessTokenRequestGrantAPTITUDE = ParsedAccessTokenAuthorizationCodeRequestGrant | ParsedAccessTokenPreAuthorizedCodeRequestGrant | ParsedAccessTokenRefreshTokenRequestGrant;
|
|
475
|
-
interface BaseParseAccessTokenRequestResult {
|
|
357
|
+
type ParsedAccessTokenRequestGrant = ParsedAccessTokenAuthorizationCodeRequestGrant | ParsedAccessTokenRefreshTokenRequestGrant;
|
|
358
|
+
interface ParseAccessTokenRequestResult {
|
|
359
|
+
accessTokenRequest: AccessTokenRequest;
|
|
476
360
|
/**
|
|
477
361
|
* The client attestation jwts from the access token request headers
|
|
478
362
|
*/
|
|
@@ -486,57 +370,33 @@ interface BaseParseAccessTokenRequestResult {
|
|
|
486
370
|
dpop: {
|
|
487
371
|
jwt: string;
|
|
488
372
|
};
|
|
489
|
-
|
|
490
|
-
interface ParseAccessTokenRequestResultV1_4 extends BaseParseAccessTokenRequestResult {
|
|
491
|
-
accessTokenRequest: AccessTokenRequest;
|
|
492
|
-
grant: ParsedAccessTokenRequestGrantV1_4;
|
|
373
|
+
grant: ParsedAccessTokenRequestGrant;
|
|
493
374
|
/**
|
|
494
375
|
* The pkce code verifier from the access token request
|
|
495
376
|
*/
|
|
496
377
|
pkceCodeVerifier?: string;
|
|
497
378
|
}
|
|
498
|
-
interface ParseAccessTokenRequestResultAPTITUDE extends BaseParseAccessTokenRequestResult {
|
|
499
|
-
accessTokenRequest: AccessTokenRequestAPTITUDE;
|
|
500
|
-
grant: ParsedAccessTokenRequestGrantAPTITUDE;
|
|
501
|
-
}
|
|
502
379
|
interface ParseAccessTokenRequestOptions {
|
|
503
380
|
/**
|
|
504
381
|
* The access token request as a JSON object. Your server should decode the
|
|
505
382
|
* `x-www-url-form-urlencoded` body into an object (e.g. using `bodyParser.urlEncoded()` in express)
|
|
506
383
|
*/
|
|
507
384
|
accessTokenRequest: Record<string, unknown>;
|
|
508
|
-
config: IoWalletSdkConfig;
|
|
509
385
|
request: RequestLike;
|
|
510
386
|
}
|
|
511
|
-
interface ParseAccessTokenRequestOptionsShared<V extends ItWalletSpecsVersion = ItWalletSpecsVersion.V1_0 | ItWalletSpecsVersion.V1_3 | ItWalletSpecsVersion.V1_4> extends ParseAccessTokenRequestOptions {
|
|
512
|
-
/**
|
|
513
|
-
* The IT-Wallet specs version to use for parsing the access token request.
|
|
514
|
-
*/
|
|
515
|
-
config: IoWalletSdkConfig<V>;
|
|
516
|
-
}
|
|
517
|
-
interface ParseAccessTokenRequestOptionsAPTITUDE extends ParseAccessTokenRequestOptions {
|
|
518
|
-
/**
|
|
519
|
-
* The IT-Wallet specs version to use for parsing the access token request.
|
|
520
|
-
*/
|
|
521
|
-
config: IoWalletSdkConfig<ItWalletSpecsVersion.APTITUDE>;
|
|
522
|
-
}
|
|
523
|
-
type ParseAccessTokenRequestResult = ParseAccessTokenRequestResultAPTITUDE | ParseAccessTokenRequestResultV1_4;
|
|
524
387
|
/**
|
|
525
388
|
* Parses and validates an OAuth 2.0 access token request.
|
|
526
389
|
*
|
|
527
390
|
* This function performs the following steps:
|
|
528
391
|
* 1. Validates the request body against the access token request schema
|
|
529
|
-
* 2. Extracts grant parameters
|
|
392
|
+
* 2. Extracts and validates grant-specific parameters (authorization code or refresh token)
|
|
530
393
|
* 3. Parses security headers (DPoP and Client Attestation JWTs)
|
|
531
|
-
* 4. Extracts PKCE code verifier if present
|
|
394
|
+
* 4. Extracts PKCE code verifier if present
|
|
532
395
|
*
|
|
533
396
|
* Note: This function only parses and validates the structure of the request.
|
|
534
397
|
* Cryptographic verification of JWTs and tokens should be performed separately.
|
|
535
398
|
*
|
|
536
|
-
*
|
|
537
|
-
* - APTITUDE: add support for pre-authorized-code grant type.
|
|
538
|
-
*
|
|
539
|
-
* @param options - Configuration object containing the access token request body and HTTP request, and version config
|
|
399
|
+
* @param options - Configuration object containing the access token request body and HTTP request
|
|
540
400
|
* @returns Parsed access token request with typed grant parameters and extracted security headers
|
|
541
401
|
* @throws {Oauth2Error} If validation fails or required parameters are missing
|
|
542
402
|
*
|
|
@@ -553,8 +413,6 @@ type ParseAccessTokenRequestResult = ParseAccessTokenRequestResultAPTITUDE | Par
|
|
|
553
413
|
* });
|
|
554
414
|
* ```
|
|
555
415
|
*/
|
|
556
|
-
declare function parseAccessTokenRequest<V extends ItWalletSpecsVersion = ItWalletSpecsVersion.V1_0 | ItWalletSpecsVersion.V1_3 | ItWalletSpecsVersion.V1_4>(options: ParseAccessTokenRequestOptionsShared<V>): ParseAccessTokenRequestResultV1_4;
|
|
557
|
-
declare function parseAccessTokenRequest(options: ParseAccessTokenRequestOptionsAPTITUDE): ParseAccessTokenRequestResultAPTITUDE;
|
|
558
416
|
declare function parseAccessTokenRequest(options: ParseAccessTokenRequestOptions): ParseAccessTokenRequestResult;
|
|
559
417
|
|
|
560
418
|
/**
|
|
@@ -1519,7 +1377,11 @@ interface VerifyAccessTokenRequestDpop {
|
|
|
1519
1377
|
*/
|
|
1520
1378
|
jwt: string;
|
|
1521
1379
|
}
|
|
1522
|
-
interface
|
|
1380
|
+
interface VerifyAccessTokenRequestOptions {
|
|
1381
|
+
/**
|
|
1382
|
+
* The access token request to verify
|
|
1383
|
+
*/
|
|
1384
|
+
accessTokenRequest: AccessTokenRequest;
|
|
1523
1385
|
/**
|
|
1524
1386
|
* The authorization server metadata
|
|
1525
1387
|
*/
|
|
@@ -1532,29 +1394,15 @@ interface BaseVerifyAccessTokenRequestOptions {
|
|
|
1532
1394
|
* Options for verifying the client attestation
|
|
1533
1395
|
*/
|
|
1534
1396
|
clientAttestation: ClientAttestationOptions;
|
|
1397
|
+
/**
|
|
1398
|
+
* The expiration date of the authorization code
|
|
1399
|
+
*/
|
|
1400
|
+
codeExpiresAt?: Date;
|
|
1535
1401
|
config: IoWalletSdkConfig;
|
|
1536
1402
|
/**
|
|
1537
1403
|
* The dpop verification options
|
|
1538
1404
|
*/
|
|
1539
1405
|
dpop: VerifyAccessTokenRequestDpop;
|
|
1540
|
-
/**
|
|
1541
|
-
* The current time to use when verifying the JWTs.
|
|
1542
|
-
* If not provided current time will be used.
|
|
1543
|
-
*
|
|
1544
|
-
* @default new Date()
|
|
1545
|
-
*/
|
|
1546
|
-
now?: Date;
|
|
1547
|
-
/**
|
|
1548
|
-
* The HTTP request information
|
|
1549
|
-
*/
|
|
1550
|
-
request: RequestLike;
|
|
1551
|
-
}
|
|
1552
|
-
interface VerifyAccessTokenRequestOptions<V extends ItWalletSpecsVersion = ItWalletSpecsVersion.V1_0> extends BaseVerifyAccessTokenRequestOptions {
|
|
1553
|
-
/**
|
|
1554
|
-
* The expiration date of the authorization code
|
|
1555
|
-
*/
|
|
1556
|
-
codeExpiresAt?: Date;
|
|
1557
|
-
config: IoWalletSdkConfig<V>;
|
|
1558
1406
|
/**
|
|
1559
1407
|
* The expected authorization code
|
|
1560
1408
|
*/
|
|
@@ -1563,25 +1411,22 @@ interface VerifyAccessTokenRequestOptions<V extends ItWalletSpecsVersion = ItWal
|
|
|
1563
1411
|
* The parsed authorization code grant
|
|
1564
1412
|
*/
|
|
1565
1413
|
grant: ParsedAccessTokenAuthorizationCodeRequestGrant;
|
|
1414
|
+
/**
|
|
1415
|
+
* The current time to use when verifying the JWTs.
|
|
1416
|
+
* If not provided current time will be used.
|
|
1417
|
+
*
|
|
1418
|
+
* @default new Date()
|
|
1419
|
+
*/
|
|
1420
|
+
now?: Date;
|
|
1566
1421
|
/**
|
|
1567
1422
|
* The pkce options including code verifier, challenge and method
|
|
1568
1423
|
*/
|
|
1569
1424
|
pkce: VerifyAccessTokenRequestPkce;
|
|
1425
|
+
/**
|
|
1426
|
+
* The HTTP request information
|
|
1427
|
+
*/
|
|
1428
|
+
request: RequestLike;
|
|
1570
1429
|
}
|
|
1571
|
-
interface VerifyPreAuthorizedCodeAccessTokenRequestOptions extends BaseVerifyAccessTokenRequestOptions {
|
|
1572
|
-
config: IoWalletSdkConfig<ItWalletSpecsVersion.APTITUDE>;
|
|
1573
|
-
/** The pre-authorized code stored by the authorization server. */
|
|
1574
|
-
expectedPreAuthorizedCode: string;
|
|
1575
|
-
/** The stored transaction code, if one was required by the credential offer. */
|
|
1576
|
-
expectedTxCode?: string;
|
|
1577
|
-
/** The parsed pre-authorized code grant */
|
|
1578
|
-
grant: ParsedAccessTokenPreAuthorizedCodeRequestGrant;
|
|
1579
|
-
/** The expiration date stored with the pre-authorized code. */
|
|
1580
|
-
preAuthorizedCodeExpiresAt?: Date;
|
|
1581
|
-
}
|
|
1582
|
-
type SupportedAccessTokenVerificationOptionsV1_4 = VerifyAccessTokenRequestOptions<ItWalletSpecsVersion.V1_0 | ItWalletSpecsVersion.V1_3 | ItWalletSpecsVersion.V1_4>;
|
|
1583
|
-
type SupportedAccessTokenVerificationOptionsAPTITUDE = VerifyAccessTokenRequestOptions<ItWalletSpecsVersion.APTITUDE> | VerifyPreAuthorizedCodeAccessTokenRequestOptions;
|
|
1584
|
-
type SupportedAccessTokenVerificationOptions = SupportedAccessTokenVerificationOptionsAPTITUDE | SupportedAccessTokenVerificationOptionsV1_4;
|
|
1585
1430
|
interface VerifyAccessTokenRequestResult {
|
|
1586
1431
|
clientAttestation: {
|
|
1587
1432
|
clientAttestation: VerifiedWalletAttestationJwt;
|
|
@@ -1597,26 +1442,18 @@ interface VerifyAccessTokenRequestResult {
|
|
|
1597
1442
|
};
|
|
1598
1443
|
}
|
|
1599
1444
|
/**
|
|
1600
|
-
* Verifies an authorization
|
|
1445
|
+
* Verifies an authorization code token request by validating PKCE, DPoP, and client attestation.
|
|
1601
1446
|
*
|
|
1602
|
-
*
|
|
1603
|
-
*
|
|
1447
|
+
* This function performs comprehensive validation of an OAuth 2.0 authorization code token request
|
|
1448
|
+
* according to Italian IT-Wallet specifications, including:
|
|
1449
|
+
* - PKCE code verifier validation against the stored code challenge
|
|
1604
1450
|
* - DPoP proof JWT verification and JWK thumbprint extraction
|
|
1605
1451
|
* - Client attestation JWT and attestation PoP JWT verification
|
|
1606
|
-
* - Authorization code
|
|
1607
|
-
*
|
|
1608
|
-
*
|
|
1609
|
-
* The caller must enforce single-use redemption of codes atomically when issuing
|
|
1610
|
-
* the token, and limit transaction-code attempts. This verifier does not store state.
|
|
1611
|
-
* The upstream verifier allows optional DPoP and client attestation; the local
|
|
1612
|
-
* implementation retains the SDK's required security checks and error types.
|
|
1613
|
-
*
|
|
1614
|
-
* * Version Differences:
|
|
1615
|
-
* - APTITUDE: add support for pre-authorized-code grant type.
|
|
1616
|
-
* *
|
|
1617
|
-
* @param options - Configuration options for token request verification and version config
|
|
1452
|
+
* - Authorization code validity and expiration checks
|
|
1453
|
+
*
|
|
1454
|
+
* @param options - Configuration options for token request verification
|
|
1618
1455
|
* @returns A promise that resolves with verified client attestation and DPoP information
|
|
1619
|
-
* @throws {Oauth2Error} If the
|
|
1456
|
+
* @throws {Oauth2Error} If the authorization code is invalid or expired
|
|
1620
1457
|
* @throws {Oauth2Error} If PKCE verification fails
|
|
1621
1458
|
* @throws {Oauth2Error} If DPoP verification fails
|
|
1622
1459
|
* @throws {Oauth2Error} If client attestation verification fails
|
|
@@ -1641,7 +1478,7 @@ interface VerifyAccessTokenRequestResult {
|
|
|
1641
1478
|
* });
|
|
1642
1479
|
* ```
|
|
1643
1480
|
*/
|
|
1644
|
-
declare function verifyAccessTokenRequest(options:
|
|
1481
|
+
declare function verifyAccessTokenRequest(options: VerifyAccessTokenRequestOptions): Promise<VerifyAccessTokenRequestResult>;
|
|
1645
1482
|
|
|
1646
1483
|
declare const zAuthorizationRequestV1_0: z$1.ZodObject<{
|
|
1647
1484
|
authorization_details: z$1.ZodOptional<z$1.ZodArray<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
@@ -3830,4 +3667,4 @@ declare const zDpopJwtHeader: z$1.ZodObject<{
|
|
|
3830
3667
|
}, z$1.core.$loose>;
|
|
3831
3668
|
type DpopJwtHeader = z$1.infer<typeof zDpopJwtHeader>;
|
|
3832
3669
|
|
|
3833
|
-
export { type AccessTokenProfileJwtHeader, type AccessTokenProfileJwtPayload, type AccessTokenRequest, type
|
|
3670
|
+
export { type AccessTokenProfileJwtHeader, type AccessTokenProfileJwtPayload, type AccessTokenRequest, type AccessTokenResponse, type AuthorizationCodeGrantIdentifier, type AuthorizationCodeGrantType, type AuthorizationRequestV1_0, type AuthorizationRequestV1_3, type BaseAuthorizationServerMetadata, type BaseVerifyWalletAttestationJwtOptions, type BaseWalletAttestationOptions, ClientAttestationError, type ClientAttestationOptions, type ItWalletClientAttestationPopJwtHeader as ClientAttestationPopJwtHeader, type ItWalletClientAttestationPopJwtPayload as ClientAttestationPopJwtPayload, type ClientAuthenticationCallback, type ClientAuthenticationCallbackOptions, type ClientAuthenticationWalletAttestationJwtOptions, type CreateAccessTokenResponseOptions, type CreateClientAttestationPopJwtOptions, type CreateClientAttestationPopJwtOptionsForVersion, type CreateClientAttestationPopJwtOptionsV1_0, type CreateClientAttestationPopJwtOptionsV1_3, type CreateClientAttestationPopJwtOptionsV1_4, type CreateJarRequestOptions, type CreateJarRequestResult, type CreateMrtdValidationJwtOptions, type CreatePkceOptions, type CreatePkceReturn, type CreatePushedAuthorizationRequestOptions, type CreatePushedAuthorizationRequestOptionsV1_0, type CreatePushedAuthorizationRequestOptionsV1_3, type CreatePushedAuthorizationRequestOptionsV1_4, CreateTokenDPoPError, type CreateTokenDPoPOptions, CreateTokenResponseError, type DpopJwtHeader, type DpopJwtPayload, type FetchMrtdPopInitOptions, type FetchMrtdPopInitResult, type FetchMrtdPopVerifyOptions, type FetchMrtdPopVerifyResult, FetchTokenResponseError, type FetchTokenResponseOptions, type GetJwtFromFormPostOptions, IT_WALLET_CLIENT_ATTESTATION_POP_ALLOWED_ALG_VALUES, type IsClientAttestationSupportedOptions, type ItWalletClientAttestationPopJwtAlg, type ItWalletClientAttestationPopJwtHeader, type ItWalletClientAttestationPopJwtPayload, type JarAuthorizationRequest, type JarRequestObjectHeader, type JarRequestObjectPayload, type MrtdChallengeJwtHeader, type MrtdChallengeJwtPayload, type MrtdDocumentData, MrtdPopError, type MrtdPopInitResponseJwtHeader, type MrtdPopInitResponseJwtPayload, type MrtdPopVerifyResponse, type MrtdValidationJwtHeader, type MrtdValidationJwtPayload, Oauth2Error, type ParseAccessTokenRequestOptions, type ParseAccessTokenRequestResult, type ParseAuthorizationRequestOptions, type ParseAuthorizationRequestResult, type ParseMrtdChallengeOptions, type ParseMrtdChallengeResult, type ParsePushedAuthorizationRequestOptions, type ParsePushedAuthorizationRequestResult, type ParsedAccessTokenAuthorizationCodeRequestGrant, type ParsedAccessTokenRefreshTokenRequestGrant, type ParsedJarRequest, type ParsedJarRequestOptions, PkceCodeChallengeMethod, type PushedAuthorizationRequest, PushedAuthorizationRequestError, type PushedAuthorizationRequestSigned, type PushedAuthorizationRequestUnsignedV1_0, type PushedAuthorizationRequestUnsignedV1_3, type PushedAuthorizationResponse, type RefreshTokenGrantIdentifier, type RefreshTokenGrantType, type RefreshTokenProfileJwtHeader, type RefreshTokenProfileJwtPayload, type RetrieveAuthorizationCodeAccessTokenOptions, SupportedClientAuthenticationMethod, type VerifiedClientAttestationPopJwt, type VerifiedJarRequest, type VerifiedWalletAttestationJwt, type VerifiedWalletAttestationJwtV1_0, type VerifiedWalletAttestationJwtV1_3, type VerifiedWalletAttestationJwtV1_4, type VerifyAccessTokenRequestDpop, type VerifyAccessTokenRequestOptions, type VerifyAccessTokenRequestPkce, type VerifyAccessTokenRequestResult, type VerifyAuthorizationRequestDPoP, type VerifyAuthorizationRequestOptions, type VerifyAuthorizationRequestResult, type VerifyClientAttestationOptions, type VerifyClientAttestationPopJwtOptions, type VerifyJarRequestOptions, type VerifyMrtdChallengeOptions, type VerifyMrtdChallengeResult, type VerifyPkceOptions, type VerifyPushedAuthorizationRequestOptions, type VerifyPushedAuthorizationRequestReturn, type VerifyTokenDPoPOptions, type VerifyWalletAttestationJwtOptions, type VerifyWalletAttestationJwtOptionsV1_0, type VerifyWalletAttestationJwtOptionsV1_3, type VerifyWalletAttestationJwtOptionsV1_4, type WalletAttestationJwtV1_0, type WalletAttestationJwtV1_3, type WalletAttestationJwtV1_4, type WalletAttestationOptionsV1_0, type WalletAttestationOptionsV1_3, type WalletAttestationOptionsV1_4, authorizationCodeGrantIdentifier, clientAuthenticationAnonymous, clientAuthenticationWalletAttestationJwt, createAccessTokenResponse, createClientAttestationPopJwt, createJarRequest, createMrtdValidationJwt, createPkce, createPushedAuthorizationRequest, createTokenDPoP, createTokenRequest, createWalletAttestationJwt$2 as createWalletAttestationJwtV1_0, createWalletAttestationJwt$1 as createWalletAttestationJwtV1_3, createWalletAttestationJwt as createWalletAttestationJwtV1_4, extractClientAttestationJwtsFromHeaders, extractDpopJwtFromHeaders, fetchJarRequestObject, fetchMrtdPopInit, fetchMrtdPopVerify, fetchPushedAuthorizationResponse, type fetchPushedAuthorizationResponseOptions, fetchTokenResponse, getJwtFromFormPost, htuFromRequestUrl, isClientAttestationSupported, isJarAuthorizationRequest, isPushedAuthorizationRequestSigned, isPushedAuthorizationRequestUnsigned, jwtAuthorizationRequestJwtHeaderTyp, oauthClientAttestationHeader, oauthClientAttestationPopHeader, parseAccessTokenRequest, parseAuthorizationRequest, parseJarRequest, parseMrtdChallenge, parsePushedAuthorizationRequest, refreshTokenGrantIdentifier, signedAuthorizationRequestJwtHeaderTyp, toURLSearchParams, validateJarRequestParams, verifyAccessTokenRequest, verifyAuthorizationRequest, verifyClientAttestation, verifyClientAttestationPopJwt, verifyJarRequest, verifyMrtdChallenge, verifyPkce, verifyPushedAuthorizationRequest, verifyTokenDPoP, verifyWalletAttestationJwt, verifyWalletAttestationJwt$3 as verifyWalletAttestationJwtV1_0, verifyWalletAttestationJwt$2 as verifyWalletAttestationJwtV1_3, verifyWalletAttestationJwt$1 as verifyWalletAttestationJwtV1_4, zAccessTokenProfileJwtHeader, zAccessTokenProfileJwtPayload, zAccessTokenRequest, zAccessTokenResponse, zAuthorizationCodeGrantIdentifier, zAuthorizationRequestV1_0, zAuthorizationRequestV1_3, zDpopJwtHeader, zDpopJwtPayload, zItWalletClientAttestationPopJwtAlg, zItWalletClientAttestationPopJwtHeader, zItWalletClientAttestationPopJwtPayload, zItWalletClientAttestationPopJwtTyp, zJarAuthorizationRequest, zJarRequestObjectHeader, zJarRequestObjectPayload, zMrtdChallengeJwtHeader, zMrtdChallengeJwtPayload, zMrtdPopInitResponseJwtHeader, zMrtdPopInitResponseJwtPayload, zMrtdPopVerifyResponse, zMrtdValidationJwtHeader, zMrtdValidationJwtPayload, zOauthClientAttestationHeader, zOauthClientAttestationPopHeader, zPushedAuthorizationRequestSigned, zPushedAuthorizationRequestUnsignedV1_0, zPushedAuthorizationRequestUnsignedV1_3, zPushedAuthorizationResponse, zRefreshTokenGrantIdentifier, zRefreshTokenProfileJwtHeader, zRefreshTokenProfileJwtPayload, zSignedAuthorizationRequestJwtHeaderTyp, zWalletAttestationJwtHeaderV1_0, zWalletAttestationJwtHeaderV1_3, zWalletAttestationJwtHeaderV1_4, zWalletAttestationJwtPayloadV1_0, zWalletAttestationJwtPayloadV1_3, zWalletAttestationJwtPayloadV1_4, zWalletAttestationJwtV1_0, zWalletAttestationJwtV1_3, zWalletAttestationJwtV1_4 };
|