@pagopa/io-wallet-oauth2 2.0.0-launchpad → 2.0.1-apt
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 +368 -205
- package/dist/index.d.ts +368 -205
- package/dist/index.js +592 -340
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +401 -145
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,152 +1,33 @@
|
|
|
1
1
|
import * as _pagopa_io_wallet_utils from '@pagopa/io-wallet-utils';
|
|
2
|
-
import { CallbackContext, Jwk, JwtSigner, RequestLike,
|
|
2
|
+
import { IoWalletSdkConfig, ItWalletSpecsVersion, CallbackContext, Jwk, JwtSigner, RequestLike, 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
|
-
|
|
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
|
-
}>;
|
|
5
|
+
declare const zAuthorizationCodeGrantIdentifier: z.ZodLiteral<"authorization_code">;
|
|
6
|
+
declare const authorizationCodeGrantIdentifier: "authorization_code";
|
|
7
|
+
type AuthorizationCodeGrantIdentifier = z.infer<typeof zAuthorizationCodeGrantIdentifier>;
|
|
8
|
+
declare const zPreAuthorizedCodeGrantIdentifier: z.ZodLiteral<"urn:ietf:params:oauth:grant-type:pre-authorized_code">;
|
|
9
|
+
declare const preAuthorizedCodeGrantIdentifier: "urn:ietf:params:oauth:grant-type:pre-authorized_code";
|
|
10
|
+
type PreAuthorizedCodeGrantIdentifier = z.infer<typeof zPreAuthorizedCodeGrantIdentifier>;
|
|
11
|
+
declare const zRefreshTokenGrantIdentifier: z.ZodLiteral<"refresh_token">;
|
|
12
|
+
declare const refreshTokenGrantIdentifier: "refresh_token";
|
|
13
|
+
type RefreshTokenGrantIdentifier = z.infer<typeof zRefreshTokenGrantIdentifier>;
|
|
149
14
|
|
|
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>;
|
|
150
31
|
declare const zAccessTokenRequest: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
151
32
|
code: z.ZodString;
|
|
152
33
|
code_verifier: z.ZodString;
|
|
@@ -158,9 +39,27 @@ declare const zAccessTokenRequest: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
|
158
39
|
scope: z.ZodOptional<z.ZodString>;
|
|
159
40
|
}, z.core.$strip>], "grant_type">;
|
|
160
41
|
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>;
|
|
161
57
|
type AuthorizationCodeGrantType = Extract<AccessTokenRequest, {
|
|
162
58
|
grant_type: "authorization_code";
|
|
163
59
|
}>;
|
|
60
|
+
type PreAuthorizedCodeGrantType = Extract<AccessTokenRequestAPTITUDE, {
|
|
61
|
+
grant_type: "urn:ietf:params:oauth:grant-type:pre-authorized_code";
|
|
62
|
+
}>;
|
|
164
63
|
type RefreshTokenGrantType = Extract<AccessTokenRequest, {
|
|
165
64
|
grant_type: "refresh_token";
|
|
166
65
|
}>;
|
|
@@ -289,16 +188,213 @@ declare const zRefreshTokenProfileJwtPayload: z.ZodObject<{
|
|
|
289
188
|
}, z.core.$loose>;
|
|
290
189
|
type RefreshTokenProfileJwtPayload = z.infer<typeof zRefreshTokenProfileJwtPayload>;
|
|
291
190
|
|
|
292
|
-
interface
|
|
191
|
+
interface BaseRetrieveAccessTokenOptions {
|
|
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 {
|
|
293
393
|
/**
|
|
294
394
|
* The endpoint URL where the access token request will be sent
|
|
295
395
|
* This should be the authorization server's token endpoint
|
|
296
396
|
*/
|
|
297
397
|
accessTokenEndpoint: string;
|
|
298
|
-
/**
|
|
299
|
-
* The access token request payload
|
|
300
|
-
*/
|
|
301
|
-
accessTokenRequest: AccessTokenRequest;
|
|
302
398
|
/**
|
|
303
399
|
* Callbacks to use for requesting access token
|
|
304
400
|
*/
|
|
@@ -308,6 +404,7 @@ interface FetchTokenResponseOptions {
|
|
|
308
404
|
* Used for OAuth-Client-Attestation-PoP header to prove possession of the client key
|
|
309
405
|
*/
|
|
310
406
|
clientAttestationDPoP: string;
|
|
407
|
+
config: IoWalletSdkConfig;
|
|
311
408
|
/**
|
|
312
409
|
* DPoP proof for the token request
|
|
313
410
|
*/
|
|
@@ -318,33 +415,47 @@ interface FetchTokenResponseOptions {
|
|
|
318
415
|
*/
|
|
319
416
|
walletAttestation: string;
|
|
320
417
|
}
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
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;
|
|
331
433
|
/**
|
|
332
434
|
* Converts an access token request object into URL-encoded form parameters.
|
|
333
435
|
*
|
|
334
436
|
* Object values are JSON-stringified so structured extension parameters such as
|
|
335
437
|
* `authorization_details` can be sent in `application/x-www-form-urlencoded` requests.
|
|
336
438
|
*
|
|
439
|
+
* Version Differences:
|
|
440
|
+
* - APTITUDE: extracts `authorization_server` (OPTIONAL), `pre-authorized_code` (REQUIRED), and `tx_code` (OPTIONAL)
|
|
441
|
+
*
|
|
337
442
|
* @param data - Access token request payload.
|
|
338
443
|
* @returns URLSearchParams containing all defined request fields.
|
|
339
444
|
*/
|
|
340
|
-
declare function toURLSearchParams(data:
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
445
|
+
declare function toURLSearchParams(data: FetchTokenResponseOptions["accessTokenRequest"]): URLSearchParams;
|
|
446
|
+
/**
|
|
447
|
+
* Sends an access token request to the authorization server and returns the response
|
|
448
|
+
*
|
|
449
|
+
* * Version Differences:
|
|
450
|
+
* - APTITUDE: add support for pre-authorized-code grant type.
|
|
451
|
+
*
|
|
452
|
+
* @param options - Configuration options for the access token request and version config.
|
|
453
|
+
* @returns Promise that resolves to the parsed access token response
|
|
454
|
+
* @throws {UnexpectedStatusCodeError} When the server returns a non-200 status code
|
|
455
|
+
* @throws {ValidationError} When the response cannot be parsed as a valid access token response
|
|
456
|
+
* @throws {FetchTokenResponseError} When an unexpected error occurs during the request
|
|
457
|
+
*/
|
|
458
|
+
declare function fetchTokenResponse(options: FetchTokenResponseOptions): Promise<AccessTokenResponse>;
|
|
348
459
|
|
|
349
460
|
interface ParsedAccessTokenAuthorizationCodeRequestGrant {
|
|
350
461
|
code: string;
|
|
@@ -354,9 +465,14 @@ interface ParsedAccessTokenRefreshTokenRequestGrant {
|
|
|
354
465
|
grantType: RefreshTokenGrantIdentifier;
|
|
355
466
|
refreshToken: string;
|
|
356
467
|
}
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
468
|
+
interface ParsedAccessTokenPreAuthorizedCodeRequestGrant {
|
|
469
|
+
grantType: PreAuthorizedCodeGrantIdentifier;
|
|
470
|
+
preAuthorizedCode: string;
|
|
471
|
+
txCode?: string;
|
|
472
|
+
}
|
|
473
|
+
type ParsedAccessTokenRequestGrantV1_4 = ParsedAccessTokenAuthorizationCodeRequestGrant | ParsedAccessTokenRefreshTokenRequestGrant;
|
|
474
|
+
type ParsedAccessTokenRequestGrantAPTITUDE = ParsedAccessTokenAuthorizationCodeRequestGrant | ParsedAccessTokenPreAuthorizedCodeRequestGrant | ParsedAccessTokenRefreshTokenRequestGrant;
|
|
475
|
+
interface BaseParseAccessTokenRequestResult {
|
|
360
476
|
/**
|
|
361
477
|
* The client attestation jwts from the access token request headers
|
|
362
478
|
*/
|
|
@@ -370,33 +486,57 @@ interface ParseAccessTokenRequestResult {
|
|
|
370
486
|
dpop: {
|
|
371
487
|
jwt: string;
|
|
372
488
|
};
|
|
373
|
-
|
|
489
|
+
}
|
|
490
|
+
interface ParseAccessTokenRequestResultV1_4 extends BaseParseAccessTokenRequestResult {
|
|
491
|
+
accessTokenRequest: AccessTokenRequest;
|
|
492
|
+
grant: ParsedAccessTokenRequestGrantV1_4;
|
|
374
493
|
/**
|
|
375
494
|
* The pkce code verifier from the access token request
|
|
376
495
|
*/
|
|
377
496
|
pkceCodeVerifier?: string;
|
|
378
497
|
}
|
|
498
|
+
interface ParseAccessTokenRequestResultAPTITUDE extends BaseParseAccessTokenRequestResult {
|
|
499
|
+
accessTokenRequest: AccessTokenRequestAPTITUDE;
|
|
500
|
+
grant: ParsedAccessTokenRequestGrantAPTITUDE;
|
|
501
|
+
}
|
|
379
502
|
interface ParseAccessTokenRequestOptions {
|
|
380
503
|
/**
|
|
381
504
|
* The access token request as a JSON object. Your server should decode the
|
|
382
505
|
* `x-www-url-form-urlencoded` body into an object (e.g. using `bodyParser.urlEncoded()` in express)
|
|
383
506
|
*/
|
|
384
507
|
accessTokenRequest: Record<string, unknown>;
|
|
508
|
+
config: IoWalletSdkConfig;
|
|
385
509
|
request: RequestLike;
|
|
386
510
|
}
|
|
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;
|
|
387
524
|
/**
|
|
388
525
|
* Parses and validates an OAuth 2.0 access token request.
|
|
389
526
|
*
|
|
390
527
|
* This function performs the following steps:
|
|
391
528
|
* 1. Validates the request body against the access token request schema
|
|
392
|
-
* 2. Extracts
|
|
529
|
+
* 2. Extracts grant parameters for authorization code, pre-authorized code or refresh token
|
|
393
530
|
* 3. Parses security headers (DPoP and Client Attestation JWTs)
|
|
394
|
-
* 4. Extracts PKCE code verifier if present
|
|
531
|
+
* 4. Extracts PKCE code verifier if present (V1_4 only)
|
|
395
532
|
*
|
|
396
533
|
* Note: This function only parses and validates the structure of the request.
|
|
397
534
|
* Cryptographic verification of JWTs and tokens should be performed separately.
|
|
398
535
|
*
|
|
399
|
-
*
|
|
536
|
+
* * * Version Differences:
|
|
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
|
|
400
540
|
* @returns Parsed access token request with typed grant parameters and extracted security headers
|
|
401
541
|
* @throws {Oauth2Error} If validation fails or required parameters are missing
|
|
402
542
|
*
|
|
@@ -413,6 +553,8 @@ interface ParseAccessTokenRequestOptions {
|
|
|
413
553
|
* });
|
|
414
554
|
* ```
|
|
415
555
|
*/
|
|
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;
|
|
416
558
|
declare function parseAccessTokenRequest(options: ParseAccessTokenRequestOptions): ParseAccessTokenRequestResult;
|
|
417
559
|
|
|
418
560
|
/**
|
|
@@ -1377,11 +1519,7 @@ interface VerifyAccessTokenRequestDpop {
|
|
|
1377
1519
|
*/
|
|
1378
1520
|
jwt: string;
|
|
1379
1521
|
}
|
|
1380
|
-
interface
|
|
1381
|
-
/**
|
|
1382
|
-
* The access token request to verify
|
|
1383
|
-
*/
|
|
1384
|
-
accessTokenRequest: AccessTokenRequest;
|
|
1522
|
+
interface BaseVerifyAccessTokenRequestOptions {
|
|
1385
1523
|
/**
|
|
1386
1524
|
* The authorization server metadata
|
|
1387
1525
|
*/
|
|
@@ -1394,15 +1532,29 @@ interface VerifyAccessTokenRequestOptions {
|
|
|
1394
1532
|
* Options for verifying the client attestation
|
|
1395
1533
|
*/
|
|
1396
1534
|
clientAttestation: ClientAttestationOptions;
|
|
1397
|
-
/**
|
|
1398
|
-
* The expiration date of the authorization code
|
|
1399
|
-
*/
|
|
1400
|
-
codeExpiresAt?: Date;
|
|
1401
1535
|
config: IoWalletSdkConfig;
|
|
1402
1536
|
/**
|
|
1403
1537
|
* The dpop verification options
|
|
1404
1538
|
*/
|
|
1405
1539
|
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>;
|
|
1406
1558
|
/**
|
|
1407
1559
|
* The expected authorization code
|
|
1408
1560
|
*/
|
|
@@ -1411,22 +1563,25 @@ interface VerifyAccessTokenRequestOptions {
|
|
|
1411
1563
|
* The parsed authorization code grant
|
|
1412
1564
|
*/
|
|
1413
1565
|
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;
|
|
1421
1566
|
/**
|
|
1422
1567
|
* The pkce options including code verifier, challenge and method
|
|
1423
1568
|
*/
|
|
1424
1569
|
pkce: VerifyAccessTokenRequestPkce;
|
|
1425
|
-
/**
|
|
1426
|
-
* The HTTP request information
|
|
1427
|
-
*/
|
|
1428
|
-
request: RequestLike;
|
|
1429
1570
|
}
|
|
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;
|
|
1430
1585
|
interface VerifyAccessTokenRequestResult {
|
|
1431
1586
|
clientAttestation: {
|
|
1432
1587
|
clientAttestation: VerifiedWalletAttestationJwt;
|
|
@@ -1442,18 +1597,26 @@ interface VerifyAccessTokenRequestResult {
|
|
|
1442
1597
|
};
|
|
1443
1598
|
}
|
|
1444
1599
|
/**
|
|
1445
|
-
* Verifies an authorization code token request
|
|
1600
|
+
* Verifies an authorization-code or pre-authorized-code token request.
|
|
1446
1601
|
*
|
|
1447
|
-
*
|
|
1448
|
-
*
|
|
1449
|
-
* - PKCE code verifier validation against the stored code challenge
|
|
1602
|
+
* Both grants retain the SDK's IT-Wallet DPoP and client attestation requirements:
|
|
1603
|
+
* - PKCE verification against the stored code challenge for authorization-code requests only
|
|
1450
1604
|
* - DPoP proof JWT verification and JWK thumbprint extraction
|
|
1451
1605
|
* - Client attestation JWT and attestation PoP JWT verification
|
|
1452
|
-
* - Authorization code validity and expiration checks
|
|
1453
|
-
*
|
|
1454
|
-
*
|
|
1606
|
+
* - Authorization code or pre-authorized code validity and expiration checks
|
|
1607
|
+
* - Transaction code verification when required by the credential offer
|
|
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
|
|
1455
1618
|
* @returns A promise that resolves with verified client attestation and DPoP information
|
|
1456
|
-
* @throws {Oauth2Error} If the
|
|
1619
|
+
* @throws {Oauth2Error} If the grant code is invalid or expired, or the transaction code is missing, unexpected or invalid
|
|
1457
1620
|
* @throws {Oauth2Error} If PKCE verification fails
|
|
1458
1621
|
* @throws {Oauth2Error} If DPoP verification fails
|
|
1459
1622
|
* @throws {Oauth2Error} If client attestation verification fails
|
|
@@ -1478,7 +1641,7 @@ interface VerifyAccessTokenRequestResult {
|
|
|
1478
1641
|
* });
|
|
1479
1642
|
* ```
|
|
1480
1643
|
*/
|
|
1481
|
-
declare function verifyAccessTokenRequest(options:
|
|
1644
|
+
declare function verifyAccessTokenRequest(options: SupportedAccessTokenVerificationOptionsAPTITUDE | SupportedAccessTokenVerificationOptionsV1_4): Promise<VerifyAccessTokenRequestResult>;
|
|
1482
1645
|
|
|
1483
1646
|
declare const zAuthorizationRequestV1_0: z$1.ZodObject<{
|
|
1484
1647
|
authorization_details: z$1.ZodOptional<z$1.ZodArray<z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
@@ -3667,4 +3830,4 @@ declare const zDpopJwtHeader: z$1.ZodObject<{
|
|
|
3667
3830
|
}, z$1.core.$loose>;
|
|
3668
3831
|
type DpopJwtHeader = z$1.infer<typeof zDpopJwtHeader>;
|
|
3669
3832
|
|
|
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
|
|
3833
|
+
export { type AccessTokenProfileJwtHeader, type AccessTokenProfileJwtPayload, type AccessTokenRequest, type AccessTokenRequestAPTITUDE, type AccessTokenResponse, type AuthorizationCodeGrantIdentifier, type AuthorizationCodeGrantType, type AuthorizationRequestV1_0, type AuthorizationRequestV1_3, type BaseAuthorizationServerMetadata, type BaseFetchTokenResponseOptions, type BaseParseAccessTokenRequestResult, type BaseRetrieveAccessTokenOptions, type BaseVerifyAccessTokenRequestOptions, 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, type CreateTokenRequestOptions, type CreateTokenRequestReturnType, CreateTokenResponseError, type DpopJwtHeader, type DpopJwtPayload, type FetchMrtdPopInitOptions, type FetchMrtdPopInitResult, type FetchMrtdPopVerifyOptions, type FetchMrtdPopVerifyResult, FetchTokenResponseError, type FetchTokenResponseOptions, type FetchTokenResponseOptionsAPTITUDE, type FetchTokenResponseOptionsShared, 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 ParseAccessTokenRequestOptionsAPTITUDE, type ParseAccessTokenRequestOptionsShared, type ParseAccessTokenRequestResult, type ParseAccessTokenRequestResultAPTITUDE, type ParseAccessTokenRequestResultV1_4, type ParseAuthorizationRequestOptions, type ParseAuthorizationRequestResult, type ParseMrtdChallengeOptions, type ParseMrtdChallengeResult, type ParsePushedAuthorizationRequestOptions, type ParsePushedAuthorizationRequestResult, type ParsedAccessTokenAuthorizationCodeRequestGrant, type ParsedAccessTokenPreAuthorizedCodeRequestGrant, type ParsedAccessTokenRefreshTokenRequestGrant, type ParsedAccessTokenRequestGrantAPTITUDE, type ParsedAccessTokenRequestGrantV1_4, type ParsedJarRequest, type ParsedJarRequestOptions, PkceCodeChallengeMethod, type PreAuthorizedCodeGrantIdentifier, type PreAuthorizedCodeGrantType, type PushedAuthorizationRequest, PushedAuthorizationRequestError, type PushedAuthorizationRequestSigned, type PushedAuthorizationRequestUnsignedV1_0, type PushedAuthorizationRequestUnsignedV1_3, type PushedAuthorizationResponse, type RefreshTokenGrantIdentifier, type RefreshTokenGrantType, type RefreshTokenProfileJwtHeader, type RefreshTokenProfileJwtPayload, type RetrieveAccessTokenOptions, type RetrieveAccessTokenOptionsAPTITUDE, type RetrieveAccessTokenOptionsAuthCode, type RetrieveAccessTokenOptionsPreAuthorizedCode, type RetrieveAccessTokenOptionsRefreshToken, type RetrieveAccessTokenOptionsShared, type SupportedAccessTokenVerificationOptions, type SupportedAccessTokenVerificationOptionsAPTITUDE, type SupportedAccessTokenVerificationOptionsV1_4, 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 VerifyPreAuthorizedCodeAccessTokenRequestOptions, 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, createTokenRequestAPTITUDE, createTokenRequestV1_4, 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, preAuthorizedCodeGrantIdentifier, 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, zAccessTokenRequestAPTITUDE, zAccessTokenResponse, zAuthorizationCodeGrantIdentifier, zAuthorizationCodeTokenRequest, zAuthorizationRequestV1_0, zAuthorizationRequestV1_3, zDpopJwtHeader, zDpopJwtPayload, zItWalletClientAttestationPopJwtAlg, zItWalletClientAttestationPopJwtHeader, zItWalletClientAttestationPopJwtPayload, zItWalletClientAttestationPopJwtTyp, zJarAuthorizationRequest, zJarRequestObjectHeader, zJarRequestObjectPayload, zMrtdChallengeJwtHeader, zMrtdChallengeJwtPayload, zMrtdPopInitResponseJwtHeader, zMrtdPopInitResponseJwtPayload, zMrtdPopVerifyResponse, zMrtdValidationJwtHeader, zMrtdValidationJwtPayload, zOauthClientAttestationHeader, zOauthClientAttestationPopHeader, zPreAuthorizedCodeGrantIdentifier, zPreAuthorizedCodeTokenRequest, zPushedAuthorizationRequestSigned, zPushedAuthorizationRequestUnsignedV1_0, zPushedAuthorizationRequestUnsignedV1_3, zPushedAuthorizationResponse, zRefreshTokenGrantIdentifier, zRefreshTokenProfileJwtHeader, zRefreshTokenProfileJwtPayload, zRefreshTokenTokenRequest, zSignedAuthorizationRequestJwtHeaderTyp, zWalletAttestationJwtHeaderV1_0, zWalletAttestationJwtHeaderV1_3, zWalletAttestationJwtHeaderV1_4, zWalletAttestationJwtPayloadV1_0, zWalletAttestationJwtPayloadV1_3, zWalletAttestationJwtPayloadV1_4, zWalletAttestationJwtV1_0, zWalletAttestationJwtV1_3, zWalletAttestationJwtV1_4 };
|