@pagopa/io-wallet-oid4vp 1.5.8 → 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 +114 -25
- package/dist/index.d.ts +114 -25
- package/dist/index.js +288 -85
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +263 -46
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -7
package/dist/index.d.mts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ItWalletSpecsVersion, IoWalletSdkConfig, HashCallback } from '@pagopa/io-wallet-utils';
|
|
1
|
+
import { CreateJarRequestOptions, JarAuthorizationRequest, CreateJarRequestResult } from '@pagopa/io-wallet-oauth2';
|
|
2
|
+
import { ItWalletSpecsVersion, JwtSignerFederation, JwtSignerX5c, CallbackContext, IoWalletSdkConfig, HashCallback, Jwk, JwkSet, JwtSigner } from '@pagopa/io-wallet-utils';
|
|
3
3
|
import z$1, { z } from 'zod';
|
|
4
|
-
import { CallbackContext as CallbackContext$1 } from '@openid4vc/oauth2';
|
|
5
4
|
import { ItWalletCredentialVerifierMetadata, ItWalletCredentialVerifierMetadataV1_3 } from '@pagopa/io-wallet-oid-federation';
|
|
6
|
-
export { CreateOpenid4vpAuthorizationResponseOptions, CreateOpenid4vpAuthorizationResponseResult, VpToken, createOpenid4vpAuthorizationResponse } from '@openid4vc/openid4vp';
|
|
7
5
|
|
|
8
6
|
/**
|
|
9
7
|
* Zod parser that describes a JWT payload
|
|
@@ -20,16 +18,34 @@ declare const zOpenid4vpAuthorizationRequestPayload: z.ZodIntersection<z.ZodObje
|
|
|
20
18
|
jwks: z.ZodObject<{
|
|
21
19
|
keys: z.ZodArray<z.ZodObject<{
|
|
22
20
|
alg: z.ZodOptional<z.ZodString>;
|
|
21
|
+
crv: z.ZodOptional<z.ZodString>;
|
|
22
|
+
d: z.ZodOptional<z.ZodString>;
|
|
23
|
+
dp: z.ZodOptional<z.ZodString>;
|
|
24
|
+
dq: z.ZodOptional<z.ZodString>;
|
|
25
|
+
e: z.ZodOptional<z.ZodString>;
|
|
26
|
+
ext: z.ZodOptional<z.ZodBoolean>;
|
|
27
|
+
k: z.ZodOptional<z.ZodString>;
|
|
23
28
|
key_ops: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
24
|
-
kid: z.ZodString;
|
|
25
29
|
kty: z.ZodString;
|
|
30
|
+
n: z.ZodOptional<z.ZodString>;
|
|
31
|
+
oth: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
32
|
+
d: z.ZodOptional<z.ZodString>;
|
|
33
|
+
r: z.ZodOptional<z.ZodString>;
|
|
34
|
+
t: z.ZodOptional<z.ZodString>;
|
|
35
|
+
}, z.core.$loose>>>;
|
|
36
|
+
p: z.ZodOptional<z.ZodString>;
|
|
37
|
+
q: z.ZodOptional<z.ZodString>;
|
|
38
|
+
qi: z.ZodOptional<z.ZodString>;
|
|
26
39
|
use: z.ZodOptional<z.ZodString>;
|
|
40
|
+
x: z.ZodOptional<z.ZodString>;
|
|
27
41
|
x5c: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
28
42
|
x5t: z.ZodOptional<z.ZodString>;
|
|
29
43
|
"x5t#S256": z.ZodOptional<z.ZodString>;
|
|
30
44
|
x5u: z.ZodOptional<z.ZodString>;
|
|
45
|
+
y: z.ZodOptional<z.ZodString>;
|
|
46
|
+
kid: z.ZodString;
|
|
31
47
|
}, z.core.$loose>>;
|
|
32
|
-
}, z.core.$
|
|
48
|
+
}, z.core.$loose>;
|
|
33
49
|
logo_uri: z.ZodOptional<z.ZodURL>;
|
|
34
50
|
redirect_uris: z.ZodOptional<z.ZodArray<z.ZodURL>>;
|
|
35
51
|
request_uris: z.ZodOptional<z.ZodArray<z.ZodURL>>;
|
|
@@ -55,7 +71,7 @@ declare const zOpenid4vpAuthorizationRequestPayload: z.ZodIntersection<z.ZodObje
|
|
|
55
71
|
transaction_data_hashes_alg: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
56
72
|
wallet_nonce: z.ZodOptional<z.ZodString>;
|
|
57
73
|
}, z.core.$loose>, z.ZodObject<{
|
|
58
|
-
aud: z.ZodOptional<z.ZodString
|
|
74
|
+
aud: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
59
75
|
cnf: z.ZodOptional<z.ZodObject<{
|
|
60
76
|
jkt: z.ZodOptional<z.ZodString>;
|
|
61
77
|
jwk: z.ZodOptional<z.ZodObject<{
|
|
@@ -95,6 +111,7 @@ declare const zOpenid4vpAuthorizationRequestPayload: z.ZodIntersection<z.ZodObje
|
|
|
95
111
|
nbf: z.ZodOptional<z.ZodNumber>;
|
|
96
112
|
nonce: z.ZodOptional<z.ZodString>;
|
|
97
113
|
status: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
114
|
+
sub: z.ZodOptional<z.ZodString>;
|
|
98
115
|
trust_chain: z.ZodOptional<z.ZodTuple<[z.ZodString], z.ZodString>>;
|
|
99
116
|
}, z.core.$strip>>;
|
|
100
117
|
type Openid4vpAuthorizationRequestPayload = z.infer<typeof zOpenid4vpAuthorizationRequestPayload>;
|
|
@@ -203,7 +220,7 @@ interface FetchAuthorizationRequestOptions {
|
|
|
203
220
|
* Callback functions for making HTTP requests
|
|
204
221
|
* Allows for custom fetch implementation
|
|
205
222
|
*/
|
|
206
|
-
callbacks: Pick<CallbackContext
|
|
223
|
+
callbacks: Pick<CallbackContext, "fetch">;
|
|
207
224
|
/**
|
|
208
225
|
* Optional wallet metadata to send when request_uri_method=post.
|
|
209
226
|
* If not provided and POST is required, sends an empty body (basic implementation).
|
|
@@ -285,7 +302,7 @@ declare function createParsedQrCode(authorizeRequestUrl: string): ParsedQrCode;
|
|
|
285
302
|
* @throws {Error} If the underlying fetch/createFetcher call fails (for example, due to network errors)
|
|
286
303
|
*/
|
|
287
304
|
declare function fetchRequestObjectJwt(requestUri: string, options: {
|
|
288
|
-
fetch: CallbackContext
|
|
305
|
+
fetch: CallbackContext["fetch"];
|
|
289
306
|
method: "get" | "post";
|
|
290
307
|
walletMetadata?: FetchAuthorizationRequestOptions["walletMetadata"];
|
|
291
308
|
walletNonce?: string;
|
|
@@ -369,7 +386,7 @@ interface ParseAuthorizeRequestOptions {
|
|
|
369
386
|
* Optional callback context for JWT signature verification and hashing x509 client_id for digest comparison.
|
|
370
387
|
* If not provided, signature verification is skipped or hash skips the x509_hash digest comparison.
|
|
371
388
|
*/
|
|
372
|
-
callbacks?: Partial<Pick<CallbackContext
|
|
389
|
+
callbacks?: Partial<Pick<CallbackContext, "hash" | "verifyJwt">> & Partial<X509CertificateBinding>;
|
|
373
390
|
config: IoWalletSdkConfig;
|
|
374
391
|
/**
|
|
375
392
|
* The Authorization Request Object JWT.
|
|
@@ -411,7 +428,7 @@ interface ParsedAuthorizeRequestResult {
|
|
|
411
428
|
* @param options {@link ParseAuthorizeRequestOptions}
|
|
412
429
|
* @returns A {@link ParsedAuthorizeRequestResult} containing the RP required credentials payload and the {@link Openid4vpAuthorizationRequestHeader} JWT header
|
|
413
430
|
* @throws {ValidationError} in case there are errors validating the Request Object structure
|
|
414
|
-
* @throws {
|
|
431
|
+
* @throws {JwtParseError} in case the request object jwt is malformed (e.g missing header, bad encoding)
|
|
415
432
|
* @throws {@link ParseAuthorizeRequestError} in case the JWT signature is invalid (when verifyJwt is provided) or there are unexpected errors
|
|
416
433
|
*/
|
|
417
434
|
declare function parseAuthorizeRequest(options: ParseAuthorizeRequestOptions): Promise<ParsedAuthorizeRequestResult>;
|
|
@@ -454,7 +471,7 @@ declare function validateAuthorizationRequestParams(params: AuthorizationRequest
|
|
|
454
471
|
}) & typeof params;
|
|
455
472
|
|
|
456
473
|
declare const zVpToken: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
457
|
-
type VpToken = z.infer<typeof zVpToken>;
|
|
474
|
+
type VpToken$1 = z.infer<typeof zVpToken>;
|
|
458
475
|
|
|
459
476
|
declare const zOpenid4vpAuthorizationResponse: z$1.ZodObject<{
|
|
460
477
|
state: z$1.ZodOptional<z$1.ZodString>;
|
|
@@ -503,7 +520,7 @@ interface CreateAuthorizationResponseOptions {
|
|
|
503
520
|
* Array containing the vp_tokens of the credentials
|
|
504
521
|
* to present
|
|
505
522
|
*/
|
|
506
|
-
vp_token: VpToken;
|
|
523
|
+
vp_token: VpToken$1;
|
|
507
524
|
}
|
|
508
525
|
type CreateAuthorizationResponseOptionsV1_0 = {
|
|
509
526
|
config: IoWalletSdkConfig<ItWalletSpecsVersion.V1_0>;
|
|
@@ -546,6 +563,74 @@ interface CreateAuthorizationResponseResult {
|
|
|
546
563
|
*/
|
|
547
564
|
declare function createAuthorizationResponse(options: CreateAuthorizationResponseVersionedOptions): Promise<CreateAuthorizationResponseResult>;
|
|
548
565
|
|
|
566
|
+
type VpTokenPresentationEntry = Record<string, unknown> | string;
|
|
567
|
+
type VpToken = [VpTokenPresentationEntry, ...VpTokenPresentationEntry[]] | Record<string, [VpTokenPresentationEntry, ...VpTokenPresentationEntry[]] | VpTokenPresentationEntry> | VpTokenPresentationEntry;
|
|
568
|
+
interface Openid4vpAuthorizationResponsePayload {
|
|
569
|
+
[key: string]: unknown;
|
|
570
|
+
access_token?: string;
|
|
571
|
+
expires_in?: number;
|
|
572
|
+
id_token?: string;
|
|
573
|
+
presentation_submission?: Record<string, unknown> | string;
|
|
574
|
+
refresh_token?: string;
|
|
575
|
+
state?: string;
|
|
576
|
+
token_type?: string;
|
|
577
|
+
vp_token: VpToken;
|
|
578
|
+
}
|
|
579
|
+
interface JarmClientMetadata {
|
|
580
|
+
authorization_encrypted_response_alg?: string;
|
|
581
|
+
authorization_encrypted_response_enc?: string;
|
|
582
|
+
authorization_signed_response_alg?: string;
|
|
583
|
+
encrypted_response_enc_values_supported?: string[];
|
|
584
|
+
jwks?: JwkSet;
|
|
585
|
+
jwks_uri?: string;
|
|
586
|
+
}
|
|
587
|
+
interface JarmServerMetadata {
|
|
588
|
+
authorization_encryption_alg_values_supported: string[];
|
|
589
|
+
authorization_encryption_enc_values_supported: string[];
|
|
590
|
+
authorization_signed_response_alg_values_supported?: string[];
|
|
591
|
+
}
|
|
592
|
+
interface CreateOpenid4vpAuthorizationResponseOptions {
|
|
593
|
+
authorizationRequestPayload: Openid4vpAuthorizationRequestPayload;
|
|
594
|
+
authorizationResponsePayload: {
|
|
595
|
+
state?: never;
|
|
596
|
+
} & Openid4vpAuthorizationResponsePayload;
|
|
597
|
+
callbacks: Pick<CallbackContext, "encryptJwe" | "fetch" | "signJwt">;
|
|
598
|
+
/**
|
|
599
|
+
* Verifier metadata resolved and verified outside the request. Required when the
|
|
600
|
+
* client_id refers to an OpenID Federation entity, whose metadata must come from
|
|
601
|
+
* the Trust Chain rather than the request's `client_metadata`.
|
|
602
|
+
*/
|
|
603
|
+
clientMetadata?: JarmClientMetadata;
|
|
604
|
+
jarm?: {
|
|
605
|
+
audience?: string;
|
|
606
|
+
authorizationServer?: string;
|
|
607
|
+
encryption?: {
|
|
608
|
+
jwk?: Jwk;
|
|
609
|
+
nonce: string;
|
|
610
|
+
};
|
|
611
|
+
/**
|
|
612
|
+
* Lifetime of the signed JARM response, in seconds from now; `exp` is set to
|
|
613
|
+
* now + this value. Defaults to 600 seconds.
|
|
614
|
+
*/
|
|
615
|
+
expiresInSeconds?: number;
|
|
616
|
+
jwtSigner?: JwtSigner;
|
|
617
|
+
serverMetadata: JarmServerMetadata;
|
|
618
|
+
};
|
|
619
|
+
origin?: string;
|
|
620
|
+
}
|
|
621
|
+
interface CreateOpenid4vpAuthorizationResponseResult {
|
|
622
|
+
authorizationResponsePayload: Openid4vpAuthorizationResponsePayload;
|
|
623
|
+
jarm?: {
|
|
624
|
+
/**
|
|
625
|
+
* The JWK returned by the `encryptJwe` callback. Only defined when the
|
|
626
|
+
* response is encrypted.
|
|
627
|
+
*/
|
|
628
|
+
encryptionJwk?: Jwk;
|
|
629
|
+
responseJwt: string;
|
|
630
|
+
};
|
|
631
|
+
}
|
|
632
|
+
declare function createOpenid4vpAuthorizationResponse(options: CreateOpenid4vpAuthorizationResponseOptions): Promise<CreateOpenid4vpAuthorizationResponseResult>;
|
|
633
|
+
|
|
549
634
|
/**
|
|
550
635
|
* Configuration options for fetching OID4VP Presentation Result
|
|
551
636
|
*/
|
|
@@ -558,7 +643,7 @@ interface FetchAuthorizationResponseOptions {
|
|
|
558
643
|
* Callback functions for making HTTP requests
|
|
559
644
|
* Allows for custom fetch implementations
|
|
560
645
|
*/
|
|
561
|
-
callbacks: Pick<CallbackContext
|
|
646
|
+
callbacks: Pick<CallbackContext, "fetch">;
|
|
562
647
|
/**
|
|
563
648
|
* The response_uri field contained in the {@link Openid4vpAuthorizationRequestPayload}
|
|
564
649
|
*/
|
|
@@ -666,7 +751,7 @@ declare const zEncryptedJarmHeader: z.ZodObject<{
|
|
|
666
751
|
type EncryptedJarmHeader = z.infer<typeof zEncryptedJarmHeader>;
|
|
667
752
|
declare const zJarmAuthorizationResponse: z.ZodObject<{
|
|
668
753
|
state: z.ZodOptional<z.ZodString>;
|
|
669
|
-
aud: z.ZodNonOptional<z.ZodOptional<z.ZodString
|
|
754
|
+
aud: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>>>;
|
|
670
755
|
exp: z.ZodNonOptional<z.ZodOptional<z.ZodNumber>>;
|
|
671
756
|
iss: z.ZodNonOptional<z.ZodOptional<z.ZodString>>;
|
|
672
757
|
cnf: z.ZodOptional<z.ZodObject<{
|
|
@@ -706,12 +791,13 @@ declare const zJarmAuthorizationResponse: z.ZodObject<{
|
|
|
706
791
|
nbf: z.ZodOptional<z.ZodNumber>;
|
|
707
792
|
nonce: z.ZodOptional<z.ZodString>;
|
|
708
793
|
status: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
794
|
+
sub: z.ZodOptional<z.ZodString>;
|
|
709
795
|
trust_chain: z.ZodOptional<z.ZodTuple<[z.ZodString], z.ZodString>>;
|
|
710
796
|
}, z.core.$loose>;
|
|
711
797
|
type JarmAuthorizationResponse = z.infer<typeof zJarmAuthorizationResponse>;
|
|
712
798
|
declare const zJarmAuthorizationResponseEncryptedOnly: z.ZodObject<{
|
|
713
799
|
state: z.ZodOptional<z.ZodString>;
|
|
714
|
-
aud: z.ZodOptional<z.ZodString
|
|
800
|
+
aud: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
715
801
|
cnf: z.ZodOptional<z.ZodObject<{
|
|
716
802
|
jkt: z.ZodOptional<z.ZodString>;
|
|
717
803
|
jwk: z.ZodOptional<z.ZodObject<{
|
|
@@ -751,6 +837,7 @@ declare const zJarmAuthorizationResponseEncryptedOnly: z.ZodObject<{
|
|
|
751
837
|
nbf: z.ZodOptional<z.ZodNumber>;
|
|
752
838
|
nonce: z.ZodOptional<z.ZodString>;
|
|
753
839
|
status: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
840
|
+
sub: z.ZodOptional<z.ZodString>;
|
|
754
841
|
trust_chain: z.ZodOptional<z.ZodTuple<[z.ZodString], z.ZodString>>;
|
|
755
842
|
}, z.core.$loose>;
|
|
756
843
|
type JarmAuthorizationResponseEncryptedOnly = z.infer<typeof zJarmAuthorizationResponseEncryptedOnly>;
|
|
@@ -817,19 +904,17 @@ declare function verifyJarmAuthorizationResponse(options: VerifyJarmAuthorizatio
|
|
|
817
904
|
decryptionJwk: {
|
|
818
905
|
[x: string]: unknown;
|
|
819
906
|
kty: string;
|
|
820
|
-
crv?: string | undefined;
|
|
821
|
-
x?: string | undefined;
|
|
822
|
-
y?: string | undefined;
|
|
823
|
-
e?: string | undefined;
|
|
824
|
-
n?: string | undefined;
|
|
825
907
|
alg?: string | undefined;
|
|
908
|
+
crv?: string | undefined;
|
|
826
909
|
d?: string | undefined;
|
|
827
910
|
dp?: string | undefined;
|
|
828
911
|
dq?: string | undefined;
|
|
912
|
+
e?: string | undefined;
|
|
829
913
|
ext?: boolean | undefined;
|
|
830
914
|
k?: string | undefined;
|
|
831
915
|
key_ops?: string[] | undefined;
|
|
832
916
|
kid?: string | undefined;
|
|
917
|
+
n?: string | undefined;
|
|
833
918
|
oth?: {
|
|
834
919
|
[x: string]: unknown;
|
|
835
920
|
d?: string | undefined;
|
|
@@ -840,15 +925,17 @@ declare function verifyJarmAuthorizationResponse(options: VerifyJarmAuthorizatio
|
|
|
840
925
|
q?: string | undefined;
|
|
841
926
|
qi?: string | undefined;
|
|
842
927
|
use?: string | undefined;
|
|
928
|
+
x?: string | undefined;
|
|
843
929
|
x5c?: string[] | undefined;
|
|
844
930
|
x5t?: string | undefined;
|
|
845
|
-
|
|
931
|
+
"x5t#S256"?: string | undefined;
|
|
846
932
|
x5u?: string | undefined;
|
|
933
|
+
y?: string | undefined;
|
|
847
934
|
} | undefined;
|
|
848
935
|
issuer: string | undefined;
|
|
849
936
|
jarmAuthorizationResponse: {
|
|
850
937
|
[x: string]: unknown;
|
|
851
|
-
aud: string;
|
|
938
|
+
aud: string | string[];
|
|
852
939
|
exp: number;
|
|
853
940
|
iss: string;
|
|
854
941
|
state?: string | undefined;
|
|
@@ -892,11 +979,12 @@ declare function verifyJarmAuthorizationResponse(options: VerifyJarmAuthorizatio
|
|
|
892
979
|
nbf?: number | undefined;
|
|
893
980
|
nonce?: string | undefined;
|
|
894
981
|
status?: Record<string, any> | undefined;
|
|
982
|
+
sub?: string | undefined;
|
|
895
983
|
trust_chain?: [string, ...string[]] | undefined;
|
|
896
984
|
} | {
|
|
897
985
|
[x: string]: unknown;
|
|
898
986
|
state?: string | undefined;
|
|
899
|
-
aud?: string | undefined;
|
|
987
|
+
aud?: string | string[] | undefined;
|
|
900
988
|
cnf?: {
|
|
901
989
|
[x: string]: unknown;
|
|
902
990
|
jkt?: string | undefined;
|
|
@@ -939,6 +1027,7 @@ declare function verifyJarmAuthorizationResponse(options: VerifyJarmAuthorizatio
|
|
|
939
1027
|
nbf?: number | undefined;
|
|
940
1028
|
nonce?: string | undefined;
|
|
941
1029
|
status?: Record<string, any> | undefined;
|
|
1030
|
+
sub?: string | undefined;
|
|
942
1031
|
trust_chain?: [string, ...string[]] | undefined;
|
|
943
1032
|
};
|
|
944
1033
|
type: JarmMode;
|
|
@@ -1139,4 +1228,4 @@ interface ParseJarmAuthorizationResponseOptions {
|
|
|
1139
1228
|
*/
|
|
1140
1229
|
declare function parseJarmAuthorizationResponse(options: ParseJarmAuthorizationResponseOptions): Promise<ParseAuthorizationResponseResult>;
|
|
1141
1230
|
|
|
1142
|
-
export { type AuthorizationRequestUrlParams, type CertificateEndpoint, type ClientIdParts, ClientIdPrefix, type CreateAuthorizationRequestOptions, type CreateAuthorizationRequestOptionsV1_0, type CreateAuthorizationRequestOptionsV1_3, type CreateAuthorizationRequestOptionsV1_4, type CreateAuthorizationRequestResult, type CreateAuthorizationRequestResultV1_0, type CreateAuthorizationRequestResultV1_3, type CreateAuthorizationRequestResultV1_4, CreateAuthorizationResponseError, type CreateAuthorizationResponseOptionsV1_0, type CreateAuthorizationResponseOptionsV1_3, type CreateAuthorizationResponseOptionsV1_4, type CreateAuthorizationResponseResult, type CreateAuthorizationResponseVersionedOptions, type EncryptedJarmHeader, type FetchAuthorizationRequestOptions, type FetchAuthorizationRequestResult, FetchAuthorizationResponseError, type FetchAuthorizationResponseOptions, type GetX509CertificateMetadataCallback, InvalidRequestUriMethodError, type JarOptionsV1_0, type JarOptionsV1_3, type JarOptionsV1_4, type JarmAuthorizationResponse, type JarmAuthorizationResponseEncryptedOnly, type JarmHeader, JarmMode, Oid4vpError, type Openid4vpAuthorizationRequestHeader, type Openid4vpAuthorizationRequestHeaderV1_0, type Openid4vpAuthorizationRequestHeaderV1_3, type Openid4vpAuthorizationRequestPayload, type Openid4vpAuthorizationResponse, type Openid4vpAuthorizationResponseResult, type ParseAuthorizationResponseOptions, type ParseAuthorizationResponseResult, ParseAuthorizeRequestError, type ParseAuthorizeRequestOptions, type ParseJarmAuthorizationResponseOptions, type ParsedAuthorizeRequestResult, type ParsedQrCode, type ValidateCertificateEndpointsOptions, type ValidateOpenid4vpAuthorizationResponseOptions, type ValidateOpenid4vpAuthorizationResponseResult, type VerifyJarmAuthorizationResponseOptions, type VerifyJarmAuthorizationResponseResult, type X509CertificateBinding, type X509CertificateMetadata, createAuthorizationRequest, createAuthorizationResponse, createParsedQrCode, createX509HashClientId, extractClientIdPrefix, extractEncryptionJwkFromJwks, fetchAuthorizationRequest, fetchAuthorizationResponse, fetchRequestObjectJwt, parseAuthorizationResponse, parseAuthorizeRequest, parseJarmAuthorizationResponse, parseVpToken, validateAuthorizationRequestParams, validateCertificateEndpoints, validateOpenid4vpAuthorizationResponsePayload, verifyJarmAuthorizationResponse, zAuthorizationRequestUrlParams, zEncryptedJarmHeader, zJarmAuthorizationResponse, zJarmAuthorizationResponseEncryptedOnly, zJarmHeader, zOpenid4vpAuthorizationRequestHeaderV1_0, zOpenid4vpAuthorizationRequestHeaderV1_3, zOpenid4vpAuthorizationRequestPayload, zOpenid4vpAuthorizationResponse, zOpenid4vpAuthorizationResponseResult, zVpToken };
|
|
1231
|
+
export { type AuthorizationRequestUrlParams, type CertificateEndpoint, type ClientIdParts, ClientIdPrefix, type CreateAuthorizationRequestOptions, type CreateAuthorizationRequestOptionsV1_0, type CreateAuthorizationRequestOptionsV1_3, type CreateAuthorizationRequestOptionsV1_4, type CreateAuthorizationRequestResult, type CreateAuthorizationRequestResultV1_0, type CreateAuthorizationRequestResultV1_3, type CreateAuthorizationRequestResultV1_4, CreateAuthorizationResponseError, type CreateAuthorizationResponseOptionsV1_0, type CreateAuthorizationResponseOptionsV1_3, type CreateAuthorizationResponseOptionsV1_4, type CreateAuthorizationResponseResult, type CreateAuthorizationResponseVersionedOptions, type CreateOpenid4vpAuthorizationResponseOptions, type CreateOpenid4vpAuthorizationResponseResult, type EncryptedJarmHeader, type FetchAuthorizationRequestOptions, type FetchAuthorizationRequestResult, FetchAuthorizationResponseError, type FetchAuthorizationResponseOptions, type GetX509CertificateMetadataCallback, InvalidRequestUriMethodError, type JarOptionsV1_0, type JarOptionsV1_3, type JarOptionsV1_4, type JarmAuthorizationResponse, type JarmAuthorizationResponseEncryptedOnly, type JarmClientMetadata, type JarmHeader, JarmMode, type JarmServerMetadata, Oid4vpError, type Openid4vpAuthorizationRequestHeader, type Openid4vpAuthorizationRequestHeaderV1_0, type Openid4vpAuthorizationRequestHeaderV1_3, type Openid4vpAuthorizationRequestPayload, type Openid4vpAuthorizationResponse, type Openid4vpAuthorizationResponsePayload, type Openid4vpAuthorizationResponseResult, type ParseAuthorizationResponseOptions, type ParseAuthorizationResponseResult, ParseAuthorizeRequestError, type ParseAuthorizeRequestOptions, type ParseJarmAuthorizationResponseOptions, type ParsedAuthorizeRequestResult, type ParsedQrCode, type ValidateCertificateEndpointsOptions, type ValidateOpenid4vpAuthorizationResponseOptions, type ValidateOpenid4vpAuthorizationResponseResult, type VerifyJarmAuthorizationResponseOptions, type VerifyJarmAuthorizationResponseResult, type VpToken, type VpTokenPresentationEntry, type X509CertificateBinding, type X509CertificateMetadata, createAuthorizationRequest, createAuthorizationResponse, createOpenid4vpAuthorizationResponse, createParsedQrCode, createX509HashClientId, extractClientIdPrefix, extractEncryptionJwkFromJwks, fetchAuthorizationRequest, fetchAuthorizationResponse, fetchRequestObjectJwt, parseAuthorizationResponse, parseAuthorizeRequest, parseJarmAuthorizationResponse, parseVpToken, validateAuthorizationRequestParams, validateCertificateEndpoints, validateOpenid4vpAuthorizationResponsePayload, verifyJarmAuthorizationResponse, zAuthorizationRequestUrlParams, zEncryptedJarmHeader, zJarmAuthorizationResponse, zJarmAuthorizationResponseEncryptedOnly, zJarmHeader, zOpenid4vpAuthorizationRequestHeaderV1_0, zOpenid4vpAuthorizationRequestHeaderV1_3, zOpenid4vpAuthorizationRequestPayload, zOpenid4vpAuthorizationResponse, zOpenid4vpAuthorizationResponseResult, zVpToken };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ItWalletSpecsVersion, IoWalletSdkConfig, HashCallback } from '@pagopa/io-wallet-utils';
|
|
1
|
+
import { CreateJarRequestOptions, JarAuthorizationRequest, CreateJarRequestResult } from '@pagopa/io-wallet-oauth2';
|
|
2
|
+
import { ItWalletSpecsVersion, JwtSignerFederation, JwtSignerX5c, CallbackContext, IoWalletSdkConfig, HashCallback, Jwk, JwkSet, JwtSigner } from '@pagopa/io-wallet-utils';
|
|
3
3
|
import z$1, { z } from 'zod';
|
|
4
|
-
import { CallbackContext as CallbackContext$1 } from '@openid4vc/oauth2';
|
|
5
4
|
import { ItWalletCredentialVerifierMetadata, ItWalletCredentialVerifierMetadataV1_3 } from '@pagopa/io-wallet-oid-federation';
|
|
6
|
-
export { CreateOpenid4vpAuthorizationResponseOptions, CreateOpenid4vpAuthorizationResponseResult, VpToken, createOpenid4vpAuthorizationResponse } from '@openid4vc/openid4vp';
|
|
7
5
|
|
|
8
6
|
/**
|
|
9
7
|
* Zod parser that describes a JWT payload
|
|
@@ -20,16 +18,34 @@ declare const zOpenid4vpAuthorizationRequestPayload: z.ZodIntersection<z.ZodObje
|
|
|
20
18
|
jwks: z.ZodObject<{
|
|
21
19
|
keys: z.ZodArray<z.ZodObject<{
|
|
22
20
|
alg: z.ZodOptional<z.ZodString>;
|
|
21
|
+
crv: z.ZodOptional<z.ZodString>;
|
|
22
|
+
d: z.ZodOptional<z.ZodString>;
|
|
23
|
+
dp: z.ZodOptional<z.ZodString>;
|
|
24
|
+
dq: z.ZodOptional<z.ZodString>;
|
|
25
|
+
e: z.ZodOptional<z.ZodString>;
|
|
26
|
+
ext: z.ZodOptional<z.ZodBoolean>;
|
|
27
|
+
k: z.ZodOptional<z.ZodString>;
|
|
23
28
|
key_ops: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
24
|
-
kid: z.ZodString;
|
|
25
29
|
kty: z.ZodString;
|
|
30
|
+
n: z.ZodOptional<z.ZodString>;
|
|
31
|
+
oth: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
32
|
+
d: z.ZodOptional<z.ZodString>;
|
|
33
|
+
r: z.ZodOptional<z.ZodString>;
|
|
34
|
+
t: z.ZodOptional<z.ZodString>;
|
|
35
|
+
}, z.core.$loose>>>;
|
|
36
|
+
p: z.ZodOptional<z.ZodString>;
|
|
37
|
+
q: z.ZodOptional<z.ZodString>;
|
|
38
|
+
qi: z.ZodOptional<z.ZodString>;
|
|
26
39
|
use: z.ZodOptional<z.ZodString>;
|
|
40
|
+
x: z.ZodOptional<z.ZodString>;
|
|
27
41
|
x5c: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
28
42
|
x5t: z.ZodOptional<z.ZodString>;
|
|
29
43
|
"x5t#S256": z.ZodOptional<z.ZodString>;
|
|
30
44
|
x5u: z.ZodOptional<z.ZodString>;
|
|
45
|
+
y: z.ZodOptional<z.ZodString>;
|
|
46
|
+
kid: z.ZodString;
|
|
31
47
|
}, z.core.$loose>>;
|
|
32
|
-
}, z.core.$
|
|
48
|
+
}, z.core.$loose>;
|
|
33
49
|
logo_uri: z.ZodOptional<z.ZodURL>;
|
|
34
50
|
redirect_uris: z.ZodOptional<z.ZodArray<z.ZodURL>>;
|
|
35
51
|
request_uris: z.ZodOptional<z.ZodArray<z.ZodURL>>;
|
|
@@ -55,7 +71,7 @@ declare const zOpenid4vpAuthorizationRequestPayload: z.ZodIntersection<z.ZodObje
|
|
|
55
71
|
transaction_data_hashes_alg: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
56
72
|
wallet_nonce: z.ZodOptional<z.ZodString>;
|
|
57
73
|
}, z.core.$loose>, z.ZodObject<{
|
|
58
|
-
aud: z.ZodOptional<z.ZodString
|
|
74
|
+
aud: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
59
75
|
cnf: z.ZodOptional<z.ZodObject<{
|
|
60
76
|
jkt: z.ZodOptional<z.ZodString>;
|
|
61
77
|
jwk: z.ZodOptional<z.ZodObject<{
|
|
@@ -95,6 +111,7 @@ declare const zOpenid4vpAuthorizationRequestPayload: z.ZodIntersection<z.ZodObje
|
|
|
95
111
|
nbf: z.ZodOptional<z.ZodNumber>;
|
|
96
112
|
nonce: z.ZodOptional<z.ZodString>;
|
|
97
113
|
status: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
114
|
+
sub: z.ZodOptional<z.ZodString>;
|
|
98
115
|
trust_chain: z.ZodOptional<z.ZodTuple<[z.ZodString], z.ZodString>>;
|
|
99
116
|
}, z.core.$strip>>;
|
|
100
117
|
type Openid4vpAuthorizationRequestPayload = z.infer<typeof zOpenid4vpAuthorizationRequestPayload>;
|
|
@@ -203,7 +220,7 @@ interface FetchAuthorizationRequestOptions {
|
|
|
203
220
|
* Callback functions for making HTTP requests
|
|
204
221
|
* Allows for custom fetch implementation
|
|
205
222
|
*/
|
|
206
|
-
callbacks: Pick<CallbackContext
|
|
223
|
+
callbacks: Pick<CallbackContext, "fetch">;
|
|
207
224
|
/**
|
|
208
225
|
* Optional wallet metadata to send when request_uri_method=post.
|
|
209
226
|
* If not provided and POST is required, sends an empty body (basic implementation).
|
|
@@ -285,7 +302,7 @@ declare function createParsedQrCode(authorizeRequestUrl: string): ParsedQrCode;
|
|
|
285
302
|
* @throws {Error} If the underlying fetch/createFetcher call fails (for example, due to network errors)
|
|
286
303
|
*/
|
|
287
304
|
declare function fetchRequestObjectJwt(requestUri: string, options: {
|
|
288
|
-
fetch: CallbackContext
|
|
305
|
+
fetch: CallbackContext["fetch"];
|
|
289
306
|
method: "get" | "post";
|
|
290
307
|
walletMetadata?: FetchAuthorizationRequestOptions["walletMetadata"];
|
|
291
308
|
walletNonce?: string;
|
|
@@ -369,7 +386,7 @@ interface ParseAuthorizeRequestOptions {
|
|
|
369
386
|
* Optional callback context for JWT signature verification and hashing x509 client_id for digest comparison.
|
|
370
387
|
* If not provided, signature verification is skipped or hash skips the x509_hash digest comparison.
|
|
371
388
|
*/
|
|
372
|
-
callbacks?: Partial<Pick<CallbackContext
|
|
389
|
+
callbacks?: Partial<Pick<CallbackContext, "hash" | "verifyJwt">> & Partial<X509CertificateBinding>;
|
|
373
390
|
config: IoWalletSdkConfig;
|
|
374
391
|
/**
|
|
375
392
|
* The Authorization Request Object JWT.
|
|
@@ -411,7 +428,7 @@ interface ParsedAuthorizeRequestResult {
|
|
|
411
428
|
* @param options {@link ParseAuthorizeRequestOptions}
|
|
412
429
|
* @returns A {@link ParsedAuthorizeRequestResult} containing the RP required credentials payload and the {@link Openid4vpAuthorizationRequestHeader} JWT header
|
|
413
430
|
* @throws {ValidationError} in case there are errors validating the Request Object structure
|
|
414
|
-
* @throws {
|
|
431
|
+
* @throws {JwtParseError} in case the request object jwt is malformed (e.g missing header, bad encoding)
|
|
415
432
|
* @throws {@link ParseAuthorizeRequestError} in case the JWT signature is invalid (when verifyJwt is provided) or there are unexpected errors
|
|
416
433
|
*/
|
|
417
434
|
declare function parseAuthorizeRequest(options: ParseAuthorizeRequestOptions): Promise<ParsedAuthorizeRequestResult>;
|
|
@@ -454,7 +471,7 @@ declare function validateAuthorizationRequestParams(params: AuthorizationRequest
|
|
|
454
471
|
}) & typeof params;
|
|
455
472
|
|
|
456
473
|
declare const zVpToken: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
457
|
-
type VpToken = z.infer<typeof zVpToken>;
|
|
474
|
+
type VpToken$1 = z.infer<typeof zVpToken>;
|
|
458
475
|
|
|
459
476
|
declare const zOpenid4vpAuthorizationResponse: z$1.ZodObject<{
|
|
460
477
|
state: z$1.ZodOptional<z$1.ZodString>;
|
|
@@ -503,7 +520,7 @@ interface CreateAuthorizationResponseOptions {
|
|
|
503
520
|
* Array containing the vp_tokens of the credentials
|
|
504
521
|
* to present
|
|
505
522
|
*/
|
|
506
|
-
vp_token: VpToken;
|
|
523
|
+
vp_token: VpToken$1;
|
|
507
524
|
}
|
|
508
525
|
type CreateAuthorizationResponseOptionsV1_0 = {
|
|
509
526
|
config: IoWalletSdkConfig<ItWalletSpecsVersion.V1_0>;
|
|
@@ -546,6 +563,74 @@ interface CreateAuthorizationResponseResult {
|
|
|
546
563
|
*/
|
|
547
564
|
declare function createAuthorizationResponse(options: CreateAuthorizationResponseVersionedOptions): Promise<CreateAuthorizationResponseResult>;
|
|
548
565
|
|
|
566
|
+
type VpTokenPresentationEntry = Record<string, unknown> | string;
|
|
567
|
+
type VpToken = [VpTokenPresentationEntry, ...VpTokenPresentationEntry[]] | Record<string, [VpTokenPresentationEntry, ...VpTokenPresentationEntry[]] | VpTokenPresentationEntry> | VpTokenPresentationEntry;
|
|
568
|
+
interface Openid4vpAuthorizationResponsePayload {
|
|
569
|
+
[key: string]: unknown;
|
|
570
|
+
access_token?: string;
|
|
571
|
+
expires_in?: number;
|
|
572
|
+
id_token?: string;
|
|
573
|
+
presentation_submission?: Record<string, unknown> | string;
|
|
574
|
+
refresh_token?: string;
|
|
575
|
+
state?: string;
|
|
576
|
+
token_type?: string;
|
|
577
|
+
vp_token: VpToken;
|
|
578
|
+
}
|
|
579
|
+
interface JarmClientMetadata {
|
|
580
|
+
authorization_encrypted_response_alg?: string;
|
|
581
|
+
authorization_encrypted_response_enc?: string;
|
|
582
|
+
authorization_signed_response_alg?: string;
|
|
583
|
+
encrypted_response_enc_values_supported?: string[];
|
|
584
|
+
jwks?: JwkSet;
|
|
585
|
+
jwks_uri?: string;
|
|
586
|
+
}
|
|
587
|
+
interface JarmServerMetadata {
|
|
588
|
+
authorization_encryption_alg_values_supported: string[];
|
|
589
|
+
authorization_encryption_enc_values_supported: string[];
|
|
590
|
+
authorization_signed_response_alg_values_supported?: string[];
|
|
591
|
+
}
|
|
592
|
+
interface CreateOpenid4vpAuthorizationResponseOptions {
|
|
593
|
+
authorizationRequestPayload: Openid4vpAuthorizationRequestPayload;
|
|
594
|
+
authorizationResponsePayload: {
|
|
595
|
+
state?: never;
|
|
596
|
+
} & Openid4vpAuthorizationResponsePayload;
|
|
597
|
+
callbacks: Pick<CallbackContext, "encryptJwe" | "fetch" | "signJwt">;
|
|
598
|
+
/**
|
|
599
|
+
* Verifier metadata resolved and verified outside the request. Required when the
|
|
600
|
+
* client_id refers to an OpenID Federation entity, whose metadata must come from
|
|
601
|
+
* the Trust Chain rather than the request's `client_metadata`.
|
|
602
|
+
*/
|
|
603
|
+
clientMetadata?: JarmClientMetadata;
|
|
604
|
+
jarm?: {
|
|
605
|
+
audience?: string;
|
|
606
|
+
authorizationServer?: string;
|
|
607
|
+
encryption?: {
|
|
608
|
+
jwk?: Jwk;
|
|
609
|
+
nonce: string;
|
|
610
|
+
};
|
|
611
|
+
/**
|
|
612
|
+
* Lifetime of the signed JARM response, in seconds from now; `exp` is set to
|
|
613
|
+
* now + this value. Defaults to 600 seconds.
|
|
614
|
+
*/
|
|
615
|
+
expiresInSeconds?: number;
|
|
616
|
+
jwtSigner?: JwtSigner;
|
|
617
|
+
serverMetadata: JarmServerMetadata;
|
|
618
|
+
};
|
|
619
|
+
origin?: string;
|
|
620
|
+
}
|
|
621
|
+
interface CreateOpenid4vpAuthorizationResponseResult {
|
|
622
|
+
authorizationResponsePayload: Openid4vpAuthorizationResponsePayload;
|
|
623
|
+
jarm?: {
|
|
624
|
+
/**
|
|
625
|
+
* The JWK returned by the `encryptJwe` callback. Only defined when the
|
|
626
|
+
* response is encrypted.
|
|
627
|
+
*/
|
|
628
|
+
encryptionJwk?: Jwk;
|
|
629
|
+
responseJwt: string;
|
|
630
|
+
};
|
|
631
|
+
}
|
|
632
|
+
declare function createOpenid4vpAuthorizationResponse(options: CreateOpenid4vpAuthorizationResponseOptions): Promise<CreateOpenid4vpAuthorizationResponseResult>;
|
|
633
|
+
|
|
549
634
|
/**
|
|
550
635
|
* Configuration options for fetching OID4VP Presentation Result
|
|
551
636
|
*/
|
|
@@ -558,7 +643,7 @@ interface FetchAuthorizationResponseOptions {
|
|
|
558
643
|
* Callback functions for making HTTP requests
|
|
559
644
|
* Allows for custom fetch implementations
|
|
560
645
|
*/
|
|
561
|
-
callbacks: Pick<CallbackContext
|
|
646
|
+
callbacks: Pick<CallbackContext, "fetch">;
|
|
562
647
|
/**
|
|
563
648
|
* The response_uri field contained in the {@link Openid4vpAuthorizationRequestPayload}
|
|
564
649
|
*/
|
|
@@ -666,7 +751,7 @@ declare const zEncryptedJarmHeader: z.ZodObject<{
|
|
|
666
751
|
type EncryptedJarmHeader = z.infer<typeof zEncryptedJarmHeader>;
|
|
667
752
|
declare const zJarmAuthorizationResponse: z.ZodObject<{
|
|
668
753
|
state: z.ZodOptional<z.ZodString>;
|
|
669
|
-
aud: z.ZodNonOptional<z.ZodOptional<z.ZodString
|
|
754
|
+
aud: z.ZodNonOptional<z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>>>;
|
|
670
755
|
exp: z.ZodNonOptional<z.ZodOptional<z.ZodNumber>>;
|
|
671
756
|
iss: z.ZodNonOptional<z.ZodOptional<z.ZodString>>;
|
|
672
757
|
cnf: z.ZodOptional<z.ZodObject<{
|
|
@@ -706,12 +791,13 @@ declare const zJarmAuthorizationResponse: z.ZodObject<{
|
|
|
706
791
|
nbf: z.ZodOptional<z.ZodNumber>;
|
|
707
792
|
nonce: z.ZodOptional<z.ZodString>;
|
|
708
793
|
status: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
794
|
+
sub: z.ZodOptional<z.ZodString>;
|
|
709
795
|
trust_chain: z.ZodOptional<z.ZodTuple<[z.ZodString], z.ZodString>>;
|
|
710
796
|
}, z.core.$loose>;
|
|
711
797
|
type JarmAuthorizationResponse = z.infer<typeof zJarmAuthorizationResponse>;
|
|
712
798
|
declare const zJarmAuthorizationResponseEncryptedOnly: z.ZodObject<{
|
|
713
799
|
state: z.ZodOptional<z.ZodString>;
|
|
714
|
-
aud: z.ZodOptional<z.ZodString
|
|
800
|
+
aud: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
715
801
|
cnf: z.ZodOptional<z.ZodObject<{
|
|
716
802
|
jkt: z.ZodOptional<z.ZodString>;
|
|
717
803
|
jwk: z.ZodOptional<z.ZodObject<{
|
|
@@ -751,6 +837,7 @@ declare const zJarmAuthorizationResponseEncryptedOnly: z.ZodObject<{
|
|
|
751
837
|
nbf: z.ZodOptional<z.ZodNumber>;
|
|
752
838
|
nonce: z.ZodOptional<z.ZodString>;
|
|
753
839
|
status: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
840
|
+
sub: z.ZodOptional<z.ZodString>;
|
|
754
841
|
trust_chain: z.ZodOptional<z.ZodTuple<[z.ZodString], z.ZodString>>;
|
|
755
842
|
}, z.core.$loose>;
|
|
756
843
|
type JarmAuthorizationResponseEncryptedOnly = z.infer<typeof zJarmAuthorizationResponseEncryptedOnly>;
|
|
@@ -817,19 +904,17 @@ declare function verifyJarmAuthorizationResponse(options: VerifyJarmAuthorizatio
|
|
|
817
904
|
decryptionJwk: {
|
|
818
905
|
[x: string]: unknown;
|
|
819
906
|
kty: string;
|
|
820
|
-
crv?: string | undefined;
|
|
821
|
-
x?: string | undefined;
|
|
822
|
-
y?: string | undefined;
|
|
823
|
-
e?: string | undefined;
|
|
824
|
-
n?: string | undefined;
|
|
825
907
|
alg?: string | undefined;
|
|
908
|
+
crv?: string | undefined;
|
|
826
909
|
d?: string | undefined;
|
|
827
910
|
dp?: string | undefined;
|
|
828
911
|
dq?: string | undefined;
|
|
912
|
+
e?: string | undefined;
|
|
829
913
|
ext?: boolean | undefined;
|
|
830
914
|
k?: string | undefined;
|
|
831
915
|
key_ops?: string[] | undefined;
|
|
832
916
|
kid?: string | undefined;
|
|
917
|
+
n?: string | undefined;
|
|
833
918
|
oth?: {
|
|
834
919
|
[x: string]: unknown;
|
|
835
920
|
d?: string | undefined;
|
|
@@ -840,15 +925,17 @@ declare function verifyJarmAuthorizationResponse(options: VerifyJarmAuthorizatio
|
|
|
840
925
|
q?: string | undefined;
|
|
841
926
|
qi?: string | undefined;
|
|
842
927
|
use?: string | undefined;
|
|
928
|
+
x?: string | undefined;
|
|
843
929
|
x5c?: string[] | undefined;
|
|
844
930
|
x5t?: string | undefined;
|
|
845
|
-
|
|
931
|
+
"x5t#S256"?: string | undefined;
|
|
846
932
|
x5u?: string | undefined;
|
|
933
|
+
y?: string | undefined;
|
|
847
934
|
} | undefined;
|
|
848
935
|
issuer: string | undefined;
|
|
849
936
|
jarmAuthorizationResponse: {
|
|
850
937
|
[x: string]: unknown;
|
|
851
|
-
aud: string;
|
|
938
|
+
aud: string | string[];
|
|
852
939
|
exp: number;
|
|
853
940
|
iss: string;
|
|
854
941
|
state?: string | undefined;
|
|
@@ -892,11 +979,12 @@ declare function verifyJarmAuthorizationResponse(options: VerifyJarmAuthorizatio
|
|
|
892
979
|
nbf?: number | undefined;
|
|
893
980
|
nonce?: string | undefined;
|
|
894
981
|
status?: Record<string, any> | undefined;
|
|
982
|
+
sub?: string | undefined;
|
|
895
983
|
trust_chain?: [string, ...string[]] | undefined;
|
|
896
984
|
} | {
|
|
897
985
|
[x: string]: unknown;
|
|
898
986
|
state?: string | undefined;
|
|
899
|
-
aud?: string | undefined;
|
|
987
|
+
aud?: string | string[] | undefined;
|
|
900
988
|
cnf?: {
|
|
901
989
|
[x: string]: unknown;
|
|
902
990
|
jkt?: string | undefined;
|
|
@@ -939,6 +1027,7 @@ declare function verifyJarmAuthorizationResponse(options: VerifyJarmAuthorizatio
|
|
|
939
1027
|
nbf?: number | undefined;
|
|
940
1028
|
nonce?: string | undefined;
|
|
941
1029
|
status?: Record<string, any> | undefined;
|
|
1030
|
+
sub?: string | undefined;
|
|
942
1031
|
trust_chain?: [string, ...string[]] | undefined;
|
|
943
1032
|
};
|
|
944
1033
|
type: JarmMode;
|
|
@@ -1139,4 +1228,4 @@ interface ParseJarmAuthorizationResponseOptions {
|
|
|
1139
1228
|
*/
|
|
1140
1229
|
declare function parseJarmAuthorizationResponse(options: ParseJarmAuthorizationResponseOptions): Promise<ParseAuthorizationResponseResult>;
|
|
1141
1230
|
|
|
1142
|
-
export { type AuthorizationRequestUrlParams, type CertificateEndpoint, type ClientIdParts, ClientIdPrefix, type CreateAuthorizationRequestOptions, type CreateAuthorizationRequestOptionsV1_0, type CreateAuthorizationRequestOptionsV1_3, type CreateAuthorizationRequestOptionsV1_4, type CreateAuthorizationRequestResult, type CreateAuthorizationRequestResultV1_0, type CreateAuthorizationRequestResultV1_3, type CreateAuthorizationRequestResultV1_4, CreateAuthorizationResponseError, type CreateAuthorizationResponseOptionsV1_0, type CreateAuthorizationResponseOptionsV1_3, type CreateAuthorizationResponseOptionsV1_4, type CreateAuthorizationResponseResult, type CreateAuthorizationResponseVersionedOptions, type EncryptedJarmHeader, type FetchAuthorizationRequestOptions, type FetchAuthorizationRequestResult, FetchAuthorizationResponseError, type FetchAuthorizationResponseOptions, type GetX509CertificateMetadataCallback, InvalidRequestUriMethodError, type JarOptionsV1_0, type JarOptionsV1_3, type JarOptionsV1_4, type JarmAuthorizationResponse, type JarmAuthorizationResponseEncryptedOnly, type JarmHeader, JarmMode, Oid4vpError, type Openid4vpAuthorizationRequestHeader, type Openid4vpAuthorizationRequestHeaderV1_0, type Openid4vpAuthorizationRequestHeaderV1_3, type Openid4vpAuthorizationRequestPayload, type Openid4vpAuthorizationResponse, type Openid4vpAuthorizationResponseResult, type ParseAuthorizationResponseOptions, type ParseAuthorizationResponseResult, ParseAuthorizeRequestError, type ParseAuthorizeRequestOptions, type ParseJarmAuthorizationResponseOptions, type ParsedAuthorizeRequestResult, type ParsedQrCode, type ValidateCertificateEndpointsOptions, type ValidateOpenid4vpAuthorizationResponseOptions, type ValidateOpenid4vpAuthorizationResponseResult, type VerifyJarmAuthorizationResponseOptions, type VerifyJarmAuthorizationResponseResult, type X509CertificateBinding, type X509CertificateMetadata, createAuthorizationRequest, createAuthorizationResponse, createParsedQrCode, createX509HashClientId, extractClientIdPrefix, extractEncryptionJwkFromJwks, fetchAuthorizationRequest, fetchAuthorizationResponse, fetchRequestObjectJwt, parseAuthorizationResponse, parseAuthorizeRequest, parseJarmAuthorizationResponse, parseVpToken, validateAuthorizationRequestParams, validateCertificateEndpoints, validateOpenid4vpAuthorizationResponsePayload, verifyJarmAuthorizationResponse, zAuthorizationRequestUrlParams, zEncryptedJarmHeader, zJarmAuthorizationResponse, zJarmAuthorizationResponseEncryptedOnly, zJarmHeader, zOpenid4vpAuthorizationRequestHeaderV1_0, zOpenid4vpAuthorizationRequestHeaderV1_3, zOpenid4vpAuthorizationRequestPayload, zOpenid4vpAuthorizationResponse, zOpenid4vpAuthorizationResponseResult, zVpToken };
|
|
1231
|
+
export { type AuthorizationRequestUrlParams, type CertificateEndpoint, type ClientIdParts, ClientIdPrefix, type CreateAuthorizationRequestOptions, type CreateAuthorizationRequestOptionsV1_0, type CreateAuthorizationRequestOptionsV1_3, type CreateAuthorizationRequestOptionsV1_4, type CreateAuthorizationRequestResult, type CreateAuthorizationRequestResultV1_0, type CreateAuthorizationRequestResultV1_3, type CreateAuthorizationRequestResultV1_4, CreateAuthorizationResponseError, type CreateAuthorizationResponseOptionsV1_0, type CreateAuthorizationResponseOptionsV1_3, type CreateAuthorizationResponseOptionsV1_4, type CreateAuthorizationResponseResult, type CreateAuthorizationResponseVersionedOptions, type CreateOpenid4vpAuthorizationResponseOptions, type CreateOpenid4vpAuthorizationResponseResult, type EncryptedJarmHeader, type FetchAuthorizationRequestOptions, type FetchAuthorizationRequestResult, FetchAuthorizationResponseError, type FetchAuthorizationResponseOptions, type GetX509CertificateMetadataCallback, InvalidRequestUriMethodError, type JarOptionsV1_0, type JarOptionsV1_3, type JarOptionsV1_4, type JarmAuthorizationResponse, type JarmAuthorizationResponseEncryptedOnly, type JarmClientMetadata, type JarmHeader, JarmMode, type JarmServerMetadata, Oid4vpError, type Openid4vpAuthorizationRequestHeader, type Openid4vpAuthorizationRequestHeaderV1_0, type Openid4vpAuthorizationRequestHeaderV1_3, type Openid4vpAuthorizationRequestPayload, type Openid4vpAuthorizationResponse, type Openid4vpAuthorizationResponsePayload, type Openid4vpAuthorizationResponseResult, type ParseAuthorizationResponseOptions, type ParseAuthorizationResponseResult, ParseAuthorizeRequestError, type ParseAuthorizeRequestOptions, type ParseJarmAuthorizationResponseOptions, type ParsedAuthorizeRequestResult, type ParsedQrCode, type ValidateCertificateEndpointsOptions, type ValidateOpenid4vpAuthorizationResponseOptions, type ValidateOpenid4vpAuthorizationResponseResult, type VerifyJarmAuthorizationResponseOptions, type VerifyJarmAuthorizationResponseResult, type VpToken, type VpTokenPresentationEntry, type X509CertificateBinding, type X509CertificateMetadata, createAuthorizationRequest, createAuthorizationResponse, createOpenid4vpAuthorizationResponse, createParsedQrCode, createX509HashClientId, extractClientIdPrefix, extractEncryptionJwkFromJwks, fetchAuthorizationRequest, fetchAuthorizationResponse, fetchRequestObjectJwt, parseAuthorizationResponse, parseAuthorizeRequest, parseJarmAuthorizationResponse, parseVpToken, validateAuthorizationRequestParams, validateCertificateEndpoints, validateOpenid4vpAuthorizationResponsePayload, verifyJarmAuthorizationResponse, zAuthorizationRequestUrlParams, zEncryptedJarmHeader, zJarmAuthorizationResponse, zJarmAuthorizationResponseEncryptedOnly, zJarmHeader, zOpenid4vpAuthorizationRequestHeaderV1_0, zOpenid4vpAuthorizationRequestHeaderV1_3, zOpenid4vpAuthorizationRequestPayload, zOpenid4vpAuthorizationResponse, zOpenid4vpAuthorizationResponseResult, zVpToken };
|