@pagopa/io-react-native-wallet 3.1.2 → 3.2.0
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/lib/commonjs/credential/issuance/README.md +44 -17
- package/lib/commonjs/credential/issuance/v1.0.0/03-complete-user-authorization.js +5 -2
- package/lib/commonjs/credential/issuance/v1.0.0/03-complete-user-authorization.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.0.0/05-obtain-credential.js +5 -1
- package/lib/commonjs/credential/issuance/v1.0.0/05-obtain-credential.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.0.0/index.js +1 -0
- package/lib/commonjs/credential/issuance/v1.0.0/index.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.3.3/03-complete-user-authorization.js +1 -1
- package/lib/commonjs/credential/issuance/v1.3.3/03-complete-user-authorization.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.3.3/05-obtain-credential.js +147 -52
- package/lib/commonjs/credential/issuance/v1.3.3/05-obtain-credential.js.map +1 -1
- package/lib/commonjs/credential/issuance/v1.3.3/index.js +1 -0
- package/lib/commonjs/credential/issuance/v1.3.3/index.js.map +1 -1
- package/lib/commonjs/credential/presentation/api/types.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.0.0/05-verify-request-object.js +18 -12
- package/lib/commonjs/credential/presentation/v1.0.0/05-verify-request-object.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.0.0/07-send-authorization-response.js +3 -0
- package/lib/commonjs/credential/presentation/v1.0.0/07-send-authorization-response.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.0.0/index.js +0 -2
- package/lib/commonjs/credential/presentation/v1.0.0/index.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.0.0/mappers.js +23 -13
- package/lib/commonjs/credential/presentation/v1.0.0/mappers.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.0.0/types.js +25 -17
- package/lib/commonjs/credential/presentation/v1.0.0/types.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.3.3/05-verify-request-object.js +29 -6
- package/lib/commonjs/credential/presentation/v1.3.3/05-verify-request-object.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.3.3/07-send-authorization-response.js +9 -6
- package/lib/commonjs/credential/presentation/v1.3.3/07-send-authorization-response.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.3.3/mappers.js +25 -13
- package/lib/commonjs/credential/presentation/v1.3.3/mappers.js.map +1 -1
- package/lib/commonjs/credential/presentation/v1.3.3/types.js +6 -3
- package/lib/commonjs/credential/presentation/v1.3.3/types.js.map +1 -1
- package/lib/commonjs/credentials-catalogue/api/DigitalCredentialsCatalogue.js +26 -1
- package/lib/commonjs/credentials-catalogue/api/DigitalCredentialsCatalogue.js.map +1 -1
- package/lib/commonjs/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.js +4 -0
- package/lib/commonjs/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.js.map +1 -1
- package/lib/commonjs/credentials-catalogue/v1.3.3/fetch-translations.js +5 -3
- package/lib/commonjs/credentials-catalogue/v1.3.3/fetch-translations.js.map +1 -1
- package/lib/commonjs/credentials-catalogue/v1.3.3/mappers.js +9 -1
- package/lib/commonjs/credentials-catalogue/v1.3.3/mappers.js.map +1 -1
- package/lib/commonjs/credentials-catalogue/v1.3.3/types.js +49 -1
- package/lib/commonjs/credentials-catalogue/v1.3.3/types.js.map +1 -1
- package/lib/commonjs/utils/callbacks.js +25 -6
- package/lib/commonjs/utils/callbacks.js.map +1 -1
- package/lib/commonjs/utils/crypto.js +58 -5
- package/lib/commonjs/utils/crypto.js.map +1 -1
- package/lib/module/credential/issuance/README.md +44 -17
- package/lib/module/credential/issuance/v1.0.0/03-complete-user-authorization.js +6 -3
- package/lib/module/credential/issuance/v1.0.0/03-complete-user-authorization.js.map +1 -1
- package/lib/module/credential/issuance/v1.0.0/05-obtain-credential.js +4 -1
- package/lib/module/credential/issuance/v1.0.0/05-obtain-credential.js.map +1 -1
- package/lib/module/credential/issuance/v1.0.0/index.js +2 -1
- package/lib/module/credential/issuance/v1.0.0/index.js.map +1 -1
- package/lib/module/credential/issuance/v1.3.3/03-complete-user-authorization.js +1 -1
- package/lib/module/credential/issuance/v1.3.3/03-complete-user-authorization.js.map +1 -1
- package/lib/module/credential/issuance/v1.3.3/05-obtain-credential.js +143 -49
- package/lib/module/credential/issuance/v1.3.3/05-obtain-credential.js.map +1 -1
- package/lib/module/credential/issuance/v1.3.3/index.js +2 -1
- package/lib/module/credential/issuance/v1.3.3/index.js.map +1 -1
- package/lib/module/credential/presentation/api/types.js.map +1 -1
- package/lib/module/credential/presentation/v1.0.0/05-verify-request-object.js +13 -7
- package/lib/module/credential/presentation/v1.0.0/05-verify-request-object.js.map +1 -1
- package/lib/module/credential/presentation/v1.0.0/07-send-authorization-response.js +4 -1
- package/lib/module/credential/presentation/v1.0.0/07-send-authorization-response.js.map +1 -1
- package/lib/module/credential/presentation/v1.0.0/index.js +0 -2
- package/lib/module/credential/presentation/v1.0.0/index.js.map +1 -1
- package/lib/module/credential/presentation/v1.0.0/mappers.js +23 -13
- package/lib/module/credential/presentation/v1.0.0/mappers.js.map +1 -1
- package/lib/module/credential/presentation/v1.0.0/types.js +23 -15
- package/lib/module/credential/presentation/v1.0.0/types.js.map +1 -1
- package/lib/module/credential/presentation/v1.3.3/05-verify-request-object.js +28 -6
- package/lib/module/credential/presentation/v1.3.3/05-verify-request-object.js.map +1 -1
- package/lib/module/credential/presentation/v1.3.3/07-send-authorization-response.js +9 -6
- package/lib/module/credential/presentation/v1.3.3/07-send-authorization-response.js.map +1 -1
- package/lib/module/credential/presentation/v1.3.3/mappers.js +25 -13
- package/lib/module/credential/presentation/v1.3.3/mappers.js.map +1 -1
- package/lib/module/credential/presentation/v1.3.3/types.js +5 -2
- package/lib/module/credential/presentation/v1.3.3/types.js.map +1 -1
- package/lib/module/credentials-catalogue/api/DigitalCredentialsCatalogue.js +24 -0
- package/lib/module/credentials-catalogue/api/DigitalCredentialsCatalogue.js.map +1 -1
- package/lib/module/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.js +5 -1
- package/lib/module/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.js.map +1 -1
- package/lib/module/credentials-catalogue/v1.3.3/fetch-translations.js +5 -3
- package/lib/module/credentials-catalogue/v1.3.3/fetch-translations.js.map +1 -1
- package/lib/module/credentials-catalogue/v1.3.3/mappers.js +9 -1
- package/lib/module/credentials-catalogue/v1.3.3/mappers.js.map +1 -1
- package/lib/module/credentials-catalogue/v1.3.3/types.js +47 -0
- package/lib/module/credentials-catalogue/v1.3.3/types.js.map +1 -1
- package/lib/module/utils/callbacks.js +26 -7
- package/lib/module/utils/callbacks.js.map +1 -1
- package/lib/module/utils/crypto.js +57 -6
- package/lib/module/utils/crypto.js.map +1 -1
- package/lib/typescript/credential/issuance/api/05-obtain-credential.d.ts +20 -0
- package/lib/typescript/credential/issuance/api/05-obtain-credential.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.0.0/03-complete-user-authorization.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.0.0/05-obtain-credential.d.ts +1 -0
- package/lib/typescript/credential/issuance/v1.0.0/05-obtain-credential.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.0.0/index.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.3.3/05-obtain-credential.d.ts +23 -2
- package/lib/typescript/credential/issuance/v1.3.3/05-obtain-credential.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/v1.3.3/index.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/api/04-verify-certificate-chain.d.ts +9 -2
- package/lib/typescript/credential/presentation/api/04-verify-certificate-chain.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/api/05-verify-request-object.d.ts +2 -2
- package/lib/typescript/credential/presentation/api/05-verify-request-object.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/api/07-send-authorization-response.d.ts +2 -2
- package/lib/typescript/credential/presentation/api/07-send-authorization-response.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/api/types.d.ts +18 -0
- package/lib/typescript/credential/presentation/api/types.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.0.0/05-verify-request-object.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.0.0/07-send-authorization-response.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.0.0/index.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.0.0/mappers.d.ts +21 -13
- package/lib/typescript/credential/presentation/v1.0.0/mappers.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.0.0/types.d.ts +23 -15
- package/lib/typescript/credential/presentation/v1.0.0/types.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.3.3/05-verify-request-object.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.3.3/07-send-authorization-response.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.3.3/mappers.d.ts +89 -79
- package/lib/typescript/credential/presentation/v1.3.3/mappers.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/v1.3.3/types.d.ts +87 -79
- package/lib/typescript/credential/presentation/v1.3.3/types.d.ts.map +1 -1
- package/lib/typescript/credentials-catalogue/api/DigitalCredentialsCatalogue.d.ts +73 -0
- package/lib/typescript/credentials-catalogue/api/DigitalCredentialsCatalogue.d.ts.map +1 -1
- package/lib/typescript/credentials-catalogue/api/index.d.ts +6 -5
- package/lib/typescript/credentials-catalogue/api/index.d.ts.map +1 -1
- package/lib/typescript/credentials-catalogue/v1.0.0/mappers.d.ts +25 -0
- package/lib/typescript/credentials-catalogue/v1.0.0/mappers.d.ts.map +1 -1
- package/lib/typescript/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.d.ts.map +1 -1
- package/lib/typescript/credentials-catalogue/v1.3.3/fetch-translations.d.ts.map +1 -1
- package/lib/typescript/credentials-catalogue/v1.3.3/mappers.d.ts +51 -0
- package/lib/typescript/credentials-catalogue/v1.3.3/mappers.d.ts.map +1 -1
- package/lib/typescript/credentials-catalogue/v1.3.3/types.d.ts +33 -0
- package/lib/typescript/credentials-catalogue/v1.3.3/types.d.ts.map +1 -1
- package/lib/typescript/utils/callbacks.d.ts.map +1 -1
- package/lib/typescript/utils/crypto.d.ts +32 -15
- package/lib/typescript/utils/crypto.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/credential/issuance/README.md +44 -17
- package/src/credential/issuance/api/05-obtain-credential.ts +24 -0
- package/src/credential/issuance/v1.0.0/03-complete-user-authorization.ts +8 -3
- package/src/credential/issuance/v1.0.0/05-obtain-credential.ts +6 -0
- package/src/credential/issuance/v1.0.0/index.ts +5 -1
- package/src/credential/issuance/v1.3.3/03-complete-user-authorization.ts +1 -1
- package/src/credential/issuance/v1.3.3/05-obtain-credential.ts +175 -80
- package/src/credential/issuance/v1.3.3/index.ts +5 -1
- package/src/credential/presentation/api/04-verify-certificate-chain.ts +9 -2
- package/src/credential/presentation/api/05-verify-request-object.ts +2 -2
- package/src/credential/presentation/api/07-send-authorization-response.ts +2 -2
- package/src/credential/presentation/api/types.ts +16 -0
- package/src/credential/presentation/v1.0.0/05-verify-request-object.ts +21 -10
- package/src/credential/presentation/v1.0.0/07-send-authorization-response.ts +7 -0
- package/src/credential/presentation/v1.0.0/index.ts +0 -2
- package/src/credential/presentation/v1.0.0/mappers.ts +17 -17
- package/src/credential/presentation/v1.0.0/types.ts +23 -15
- package/src/credential/presentation/v1.3.3/05-verify-request-object.ts +63 -10
- package/src/credential/presentation/v1.3.3/07-send-authorization-response.ts +13 -4
- package/src/credential/presentation/v1.3.3/mappers.ts +19 -17
- package/src/credential/presentation/v1.3.3/types.ts +9 -3
- package/src/credentials-catalogue/api/DigitalCredentialsCatalogue.ts +32 -0
- package/src/credentials-catalogue/api/index.ts +6 -3
- package/src/credentials-catalogue/v1.3.3/fetch-and-parse-catalogue.ts +6 -0
- package/src/credentials-catalogue/v1.3.3/fetch-translations.ts +6 -3
- package/src/credentials-catalogue/v1.3.3/mappers.ts +17 -1
- package/src/credentials-catalogue/v1.3.3/types.ts +51 -0
- package/src/utils/callbacks.ts +29 -8
- package/src/utils/crypto.ts +86 -15
- package/lib/commonjs/credential/presentation/v1.0.0/04-verify-certificate-chain.js +0 -12
- package/lib/commonjs/credential/presentation/v1.0.0/04-verify-certificate-chain.js.map +0 -1
- package/lib/module/credential/presentation/v1.0.0/04-verify-certificate-chain.js +0 -5
- package/lib/module/credential/presentation/v1.0.0/04-verify-certificate-chain.js.map +0 -1
- package/lib/typescript/credential/presentation/v1.0.0/04-verify-certificate-chain.d.ts +0 -3
- package/lib/typescript/credential/presentation/v1.0.0/04-verify-certificate-chain.d.ts.map +0 -1
- package/src/credential/presentation/v1.0.0/04-verify-certificate-chain.ts +0 -10
|
@@ -169,6 +169,32 @@ export declare const mapToCredentialsCatalogue: (input: [{
|
|
|
169
169
|
}[];
|
|
170
170
|
last_modified?: string | undefined;
|
|
171
171
|
last_updated?: string | undefined;
|
|
172
|
+
}, {
|
|
173
|
+
version: string;
|
|
174
|
+
last_modified: string;
|
|
175
|
+
id: string;
|
|
176
|
+
name_l10n_id: string;
|
|
177
|
+
description_l10n_id: string;
|
|
178
|
+
domains: {
|
|
179
|
+
id: string;
|
|
180
|
+
name_l10n_id: string;
|
|
181
|
+
description_l10n_id: string;
|
|
182
|
+
classes: {
|
|
183
|
+
id: string;
|
|
184
|
+
name_l10n_id: string;
|
|
185
|
+
supported_purposes: string[];
|
|
186
|
+
}[];
|
|
187
|
+
}[];
|
|
188
|
+
purposes: {
|
|
189
|
+
id: string;
|
|
190
|
+
name_l10n_id: string;
|
|
191
|
+
}[];
|
|
192
|
+
localization?: {
|
|
193
|
+
available_locales: string[];
|
|
194
|
+
base_uri: string;
|
|
195
|
+
default_locale: string;
|
|
196
|
+
version: string;
|
|
197
|
+
} | undefined;
|
|
172
198
|
}]) => {
|
|
173
199
|
taxonomy_uri: string;
|
|
174
200
|
credentials: {
|
|
@@ -249,6 +275,31 @@ export declare const mapToCredentialsCatalogue: (input: [{
|
|
|
249
275
|
}[];
|
|
250
276
|
iat: number;
|
|
251
277
|
exp: number;
|
|
278
|
+
taxonomy?: {
|
|
279
|
+
id: string;
|
|
280
|
+
name_l10n_id: string;
|
|
281
|
+
description_l10n_id: string;
|
|
282
|
+
domains: {
|
|
283
|
+
id: string;
|
|
284
|
+
name_l10n_id: string;
|
|
285
|
+
description_l10n_id: string;
|
|
286
|
+
classes: {
|
|
287
|
+
id: string;
|
|
288
|
+
name_l10n_id: string;
|
|
289
|
+
supported_purposes: string[];
|
|
290
|
+
}[];
|
|
291
|
+
}[];
|
|
292
|
+
purposes: {
|
|
293
|
+
id: string;
|
|
294
|
+
name_l10n_id: string;
|
|
295
|
+
}[];
|
|
296
|
+
localization?: {
|
|
297
|
+
available_locales: string[];
|
|
298
|
+
base_uri: string;
|
|
299
|
+
default_locale: string;
|
|
300
|
+
version: string;
|
|
301
|
+
} | undefined;
|
|
302
|
+
} | undefined;
|
|
252
303
|
localization?: {
|
|
253
304
|
available_locales: string[];
|
|
254
305
|
base_uri: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mappers.d.ts","sourceRoot":"","sources":["../../../../src/credentials-catalogue/v1.3.3/mappers.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"mappers.d.ts","sourceRoot":"","sources":["../../../../src/credentials-catalogue/v1.3.3/mappers.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkFrC,CAAC"}
|
|
@@ -310,4 +310,37 @@ export declare const RegistryDiscoveryJwt: z.ZodObject<{
|
|
|
310
310
|
}, z.core.$strip>;
|
|
311
311
|
}, z.core.$strip>;
|
|
312
312
|
export type RegistryDiscoveryJwt = z.infer<typeof RegistryDiscoveryJwt>;
|
|
313
|
+
/**
|
|
314
|
+
* Taxonomy registry, available at a dedicated endpoint.
|
|
315
|
+
* Provides a hierarchical classification of domains, classes, and purposes.
|
|
316
|
+
* @see https://italia.github.io/eid-wallet-it-docs/releases/1.3.3/en/registry.html#taxonomy
|
|
317
|
+
*/
|
|
318
|
+
export declare const TaxonomyRegistry: z.ZodObject<{
|
|
319
|
+
version: z.ZodString;
|
|
320
|
+
last_modified: z.ZodString;
|
|
321
|
+
id: z.ZodString;
|
|
322
|
+
localization: z.ZodOptional<z.ZodObject<{
|
|
323
|
+
available_locales: z.ZodArray<z.ZodString>;
|
|
324
|
+
base_uri: z.ZodString;
|
|
325
|
+
default_locale: z.ZodString;
|
|
326
|
+
version: z.ZodString;
|
|
327
|
+
}, z.core.$strip>>;
|
|
328
|
+
name_l10n_id: z.ZodString;
|
|
329
|
+
description_l10n_id: z.ZodString;
|
|
330
|
+
domains: z.ZodArray<z.ZodObject<{
|
|
331
|
+
id: z.ZodString;
|
|
332
|
+
name_l10n_id: z.ZodString;
|
|
333
|
+
description_l10n_id: z.ZodString;
|
|
334
|
+
classes: z.ZodArray<z.ZodObject<{
|
|
335
|
+
id: z.ZodString;
|
|
336
|
+
name_l10n_id: z.ZodString;
|
|
337
|
+
supported_purposes: z.ZodArray<z.ZodString>;
|
|
338
|
+
}, z.core.$strip>>;
|
|
339
|
+
}, z.core.$strip>>;
|
|
340
|
+
purposes: z.ZodArray<z.ZodObject<{
|
|
341
|
+
id: z.ZodString;
|
|
342
|
+
name_l10n_id: z.ZodString;
|
|
343
|
+
}, z.core.$strip>>;
|
|
344
|
+
}, z.core.$strip>;
|
|
345
|
+
export type TaxonomyRegistry = z.infer<typeof TaxonomyRegistry>;
|
|
313
346
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/credentials-catalogue/v1.3.3/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAmCzB,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuB1B,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9D,eAAO,MAAM,MAAM;;;;;;;;;;;;;iBAUjB,CAAC;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,CAAC;AA6B5C,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuC5B,CAAC;AASH;;;GAGG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;iBAKzB,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D;;;GAGG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAalC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE9E;;;GAGG;AACH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmBzC,CAAC;AACH,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAClD,OAAO,8BAA8B,CACtC,CAAC;AAmBF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;iBAO/B,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/credentials-catalogue/v1.3.3/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAmCzB,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuB1B,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9D,eAAO,MAAM,MAAM;;;;;;;;;;;;;iBAUjB,CAAC;AACH,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,MAAM,CAAC,CAAC;AA6B5C,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAuC5B,CAAC;AASH;;;GAGG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;iBAKzB,CAAC;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D;;;GAGG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAalC,CAAC;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAE9E;;;GAGG;AACH,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAmBzC,CAAC;AACH,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAClD,OAAO,8BAA8B,CACtC,CAAC;AAmBF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;iBAO/B,CAAC;AACH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AA6BxE;;;;GAIG;AACH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;iBAgB3B,CAAC;AACH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"callbacks.d.ts","sourceRoot":"","sources":["../../../src/utils/callbacks.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,eAAe,
|
|
1
|
+
{"version":3,"file":"callbacks.d.ts","sourceRoot":"","sources":["../../../src/utils/callbacks.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,eAAe,EAAkB,MAAM,0BAA0B,CAAC;AAKhF,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAGjC,KAAK,sBAAsB,GAAG,IAAI,CAChC,eAAe,EACf,SAAS,GAAG,sBAAsB,CACnC,CAAC;AA+BF;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,EAAE,sBAoC9B,CAAC;AAIF;;;;;;;;GAQG;AACH,eAAO,MAAM,uBAAuB,GAClC,MAAM,GAAG,EAAE,KACV,eAAe,CAAC,WAAW,CAU7B,CAAC"}
|
|
@@ -1,5 +1,23 @@
|
|
|
1
1
|
import { type CryptoContext } from "@pagopa/io-react-native-jwt";
|
|
2
2
|
import { JWK } from "./jwk";
|
|
3
|
+
/**
|
|
4
|
+
* Extension of the {@link CryptoContext} that adds key generation with optional key attestation.
|
|
5
|
+
*
|
|
6
|
+
* This context requires the consumer to provide an additional method for **key generation**;
|
|
7
|
+
* on Android this method should also generate a key attestation as a certificate chain
|
|
8
|
+
* to ensure the key pair is hardware-backed.
|
|
9
|
+
*/
|
|
10
|
+
export type KeyAttestationCryptoContext = CryptoContext & {
|
|
11
|
+
/**
|
|
12
|
+
* Generate a key pair with an **optional key attestation** (Android).
|
|
13
|
+
* @param challenge The challenge for the key attestation.
|
|
14
|
+
* @returns An object with a success flag and a key attestation, if it was generated.
|
|
15
|
+
*/
|
|
16
|
+
generateKeyWithAttestation(challenge: string): Promise<{
|
|
17
|
+
success: boolean;
|
|
18
|
+
attestation?: string;
|
|
19
|
+
}>;
|
|
20
|
+
};
|
|
3
21
|
/**
|
|
4
22
|
* Create a CryptoContext bound to a key pair.
|
|
5
23
|
* Key pair is supposed to exist already in the device's keychain.
|
|
@@ -33,21 +51,20 @@ export declare const convertBase64DerToPem: (certificate: string) => string;
|
|
|
33
51
|
*/
|
|
34
52
|
export declare const getSigninJwkFromCert: (pemCert: string) => JWK;
|
|
35
53
|
/**
|
|
36
|
-
*
|
|
54
|
+
* Retrieves the signing JWK from a x509 certificate chain.
|
|
37
55
|
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
56
|
+
* @param certChain - The x509 certificate chain.
|
|
57
|
+
* @returns The signing JWK.
|
|
58
|
+
* @throws Will throw an error if no suitable keys are found.
|
|
41
59
|
*/
|
|
42
|
-
export
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
};
|
|
60
|
+
export declare const getJwkFromCertificateChain: (certChain: string[]) => Promise<JWK>;
|
|
61
|
+
/**
|
|
62
|
+
* Retrieves the signing JWK from a trust chain of entity configuration JWTs, matching the provided signer KID.
|
|
63
|
+
*
|
|
64
|
+
* @param trustChain - The trust chain of entity configuration JWTs.
|
|
65
|
+
* @param signerKid - The KID of the signer to look for in the trust chain.
|
|
66
|
+
* @returns The signing JWK.
|
|
67
|
+
* @throws Will throw an error if no suitable keys are found.
|
|
68
|
+
*/
|
|
69
|
+
export declare const getJwkFromTrustChain: (trustChain: string[], signerKid: string) => JWK;
|
|
53
70
|
//# sourceMappingURL=crypto.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crypto.d.ts","sourceRoot":"","sources":["../../../src/utils/crypto.ts"],"names":[],"mappings":"AAOA,OAAO,
|
|
1
|
+
{"version":3,"file":"crypto.d.ts","sourceRoot":"","sources":["../../../src/utils/crypto.ts"],"names":[],"mappings":"AAOA,OAAO,EAGL,KAAK,aAAa,EACnB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,GAAG,EAAQ,MAAM,OAAO,CAAC;AAIlC;;;;;;GAMG;AACH,MAAM,MAAM,2BAA2B,GAAG,aAAa,GAAG;IACxD;;;;OAIG;IACH,0BAA0B,CACxB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,WAAW,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACxD,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,sBAAsB,GAAI,QAAQ,MAAM,KAAG,aAsBvD,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,GAAU,CAAC,EACtC,IAAI,CAAC,gBAAgB,EAAE,aAAa,KAAK,OAAO,CAAC,CAAC,CAAC,KAClD,OAAO,CAAC,CAAC,CAMX,CAAC;AACF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,GAAI,aAAa,MAAM,KAAG,MACc,CAAC;AAE3E;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,GAAI,SAAS,MAAM,KAAG,GAetD,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,GACrC,WAAW,MAAM,EAAE,KAClB,OAAO,CAAC,GAAG,CASb,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,GAC/B,YAAY,MAAM,EAAE,EACpB,WAAW,MAAM,KAChB,GAiCF,CAAC"}
|
package/package.json
CHANGED
|
@@ -8,6 +8,8 @@ Credentials instead require a simpler authorization flow and they require other
|
|
|
8
8
|
|
|
9
9
|
The supported credentials are defined in the entity configuration of the issuer which is evaluted and parsed in the `evaluateIssuerTrust` step. Available credentials are identified with a unique `credential_configuration_id`, that must be used when requesting authorization. The Authorization Server returns an array of **credential identifiers** that map to the `credential_configuration_id` provided: to obtain the credential, one of the credential identifiers (or all of them) must be requested to the credential endpoint.
|
|
10
10
|
|
|
11
|
+
In the newest versions of IT-Wallet specifications it is mandatory that the cryptographic keys bound to each credential are stored in a WSCD and attested in a **Wallet Unit Attestation**, that must be sent to the Issuer when requesting a credential.
|
|
12
|
+
|
|
11
13
|
## Sequence Diagram
|
|
12
14
|
|
|
13
15
|
```mermaid
|
|
@@ -20,8 +22,9 @@ graph TD;
|
|
|
20
22
|
C4.1[completeUserAuthorizationWithFormPostJwtMode]
|
|
21
23
|
E4[completeUserAuthorizationWithQueryMode]
|
|
22
24
|
5[authorizeAccess]
|
|
23
|
-
6[
|
|
24
|
-
7[
|
|
25
|
+
6[WalletUnitAttestation.getAttestation]
|
|
26
|
+
7[obtainCredential]
|
|
27
|
+
8[verifyAndParseCredential]
|
|
25
28
|
credSel{Is credential an eID?}
|
|
26
29
|
proofSel{Requires MRTD PoP?}
|
|
27
30
|
M1[continueUserAuthorizationWithMRTDPoPChallenge]
|
|
@@ -44,6 +47,7 @@ graph TD;
|
|
|
44
47
|
E4 --> 5
|
|
45
48
|
5 --> 6
|
|
46
49
|
6 --> 7
|
|
50
|
+
7 --> 8
|
|
47
51
|
|
|
48
52
|
M1 --> M2
|
|
49
53
|
M2 --> M3
|
|
@@ -92,6 +96,10 @@ When the credential is different than an eID, the flow requires the user to pres
|
|
|
92
96
|
|
|
93
97
|
The expected result from the authentication process is in `form_post.jwt` format as defined in [JWT Secured Authorization Response Mode for OAuth 2.0 (JARM)](https://openid.net/specs/oauth-v2-jarm.html#name-response-mode-form_postjwt).
|
|
94
98
|
|
|
99
|
+
## Batch issuance
|
|
100
|
+
|
|
101
|
+
To obtain a batch of credentials the Issuance module exposes a dedicated method—`obtainCredentialsBatch`—that returns a list of credentials of the same type with different cryptographic data. For this reason the caller must generate multiple keys and attest them in a single Wallet Unit Attestation.
|
|
102
|
+
|
|
95
103
|
## Examples
|
|
96
104
|
|
|
97
105
|
<details>
|
|
@@ -119,12 +127,28 @@ const { WALLET_PROVIDER_BASE_URL, WALLET_EAA_PROVIDER_BASE_URL, REDIRECT_URI } =
|
|
|
119
127
|
* WARNING: The integrity context must be the same used when creating the Wallet Instance with the same keytag.
|
|
120
128
|
*/
|
|
121
129
|
const walletInstanceAttestation =
|
|
122
|
-
await WalletInstanceAttestation.getAttestation(
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
130
|
+
await wallet.WalletInstanceAttestation.getAttestation(
|
|
131
|
+
{
|
|
132
|
+
walletProviderBaseUrl: WALLET_PROVIDER_BASE_URL,
|
|
133
|
+
walletSolutionId: "exampleId",
|
|
134
|
+
walletSolutionVersion: "1.2.3",
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
wiaCryptoContext,
|
|
138
|
+
integrityContext,
|
|
139
|
+
appFetch,
|
|
140
|
+
}
|
|
141
|
+
);
|
|
142
|
+
|
|
143
|
+
const credentialKeyTag = uuidv4().toString();
|
|
144
|
+
let walletUnitAttestation: string | undefined;
|
|
145
|
+
|
|
146
|
+
// Obtains a Wallet Unit Attestation if supported
|
|
147
|
+
if (wallet.WalletUnitAttestation.isSupported) {
|
|
148
|
+
walletUnitAttestation = await wallet.WalletUnitAttestation.getAttestation(); // See the Wallet Unit Attestation README for more details
|
|
149
|
+
} else {
|
|
150
|
+
await generate(credentialKeyTag); // Let's assume this function generates a new hardware-backed key pair
|
|
151
|
+
}
|
|
128
152
|
|
|
129
153
|
const pid = {
|
|
130
154
|
credential: "example",
|
|
@@ -133,9 +157,6 @@ const pid = {
|
|
|
133
157
|
credentialType: "PersonIdentificationData";
|
|
134
158
|
};
|
|
135
159
|
|
|
136
|
-
// Create credential crypto context
|
|
137
|
-
const credentialKeyTag = uuidv4().toString();
|
|
138
|
-
await generate(credentialKeyTag); // Let's assume this function generates a new hardware-backed key pair
|
|
139
160
|
const credentialCryptoContext = createCryptoContextFor(credentialKeyTag);
|
|
140
161
|
|
|
141
162
|
// Evaluate issuer trust
|
|
@@ -271,12 +292,18 @@ const { WALLET_PROVIDER_BASE_URL, WALLET_EID_PROVIDER_BASE_URL, REDIRECT_URI } =
|
|
|
271
292
|
* WARNING: The integrity context must be the same used when creating the Wallet Instance with the same keytag.
|
|
272
293
|
*/
|
|
273
294
|
const walletInstanceAttestation =
|
|
274
|
-
await WalletInstanceAttestation.getAttestation(
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
295
|
+
await wallet.WalletInstanceAttestation.getAttestation(
|
|
296
|
+
{
|
|
297
|
+
walletProviderBaseUrl: WALLET_PROVIDER_BASE_URL,
|
|
298
|
+
walletSolutionId: "exampleId",
|
|
299
|
+
walletSolutionVersion: "1.2.3",
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
wiaCryptoContext,
|
|
303
|
+
integrityContext,
|
|
304
|
+
appFetch,
|
|
305
|
+
}
|
|
306
|
+
);
|
|
280
307
|
|
|
281
308
|
const idpHit = "https://example.com"; // Let's assume this is the IDP hint
|
|
282
309
|
|
|
@@ -41,4 +41,28 @@ export interface ObtainCredentialApi {
|
|
|
41
41
|
credential: string;
|
|
42
42
|
format: CredentialFormat;
|
|
43
43
|
}>;
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Obtains a batch of credentials from the issuer.
|
|
47
|
+
* The batch includes the same credential format and dataset with different cryptographic data.
|
|
48
|
+
* For this reason, the function accepts a list of {@link CryptoContext}; the rest of the parameters are the same as {@link obtainCredential}.
|
|
49
|
+
* @since 1.3.3
|
|
50
|
+
*
|
|
51
|
+
* @returns The list of credentials issued in the batch.
|
|
52
|
+
*/
|
|
53
|
+
obtainCredentialsBatch(
|
|
54
|
+
issuerConf: IssuerConfig,
|
|
55
|
+
accessToken: Out<AuthorizeAccessApi["authorizeAccess"]>["accessToken"],
|
|
56
|
+
clientId: string,
|
|
57
|
+
credentialDefinition: {
|
|
58
|
+
credential_configuration_id: string;
|
|
59
|
+
credential_identifier: string;
|
|
60
|
+
},
|
|
61
|
+
context: {
|
|
62
|
+
dPopCryptoContext: CryptoContext;
|
|
63
|
+
credentialCryptoContexts: CryptoContext[];
|
|
64
|
+
walletUnitAttestation?: string;
|
|
65
|
+
appFetch?: GlobalFetch["fetch"];
|
|
66
|
+
}
|
|
67
|
+
): Promise<{ credential: string; format: CredentialFormat }[]>;
|
|
44
68
|
}
|
|
@@ -17,7 +17,7 @@ import { ResponseUriResultShape } from "./types";
|
|
|
17
17
|
import { getJwtFromFormPost } from "../../../utils/decoder";
|
|
18
18
|
import { AuthorizationError, AuthorizationIdpError } from "../common/errors";
|
|
19
19
|
import { LogLevel, Logger } from "../../../utils/logging";
|
|
20
|
-
import {
|
|
20
|
+
import { RawRequestObject } from "../../presentation/v1.0.0/types";
|
|
21
21
|
import { RemotePresentation as RemotePresentationFlow } from "../../presentation/v1.0.0";
|
|
22
22
|
import type { IssuanceApi } from "../api";
|
|
23
23
|
import type { RemotePresentation } from "../../presentation";
|
|
@@ -105,7 +105,12 @@ export const getRequestedCredentialToBePresented: IssuanceApi["getRequestedCrede
|
|
|
105
105
|
.then(hasStatusOrThrow(200, IssuerResponseError))
|
|
106
106
|
.then((res) => res.text())
|
|
107
107
|
.then((jws) => decode(jws))
|
|
108
|
-
.then((reqObj) =>
|
|
108
|
+
.then((reqObj) =>
|
|
109
|
+
RawRequestObject.safeParse({
|
|
110
|
+
header: reqObj.protectedHeader,
|
|
111
|
+
payload: reqObj.payload,
|
|
112
|
+
})
|
|
113
|
+
);
|
|
109
114
|
|
|
110
115
|
if (!requestObject.success) {
|
|
111
116
|
Logger.log(
|
|
@@ -117,7 +122,7 @@ export const getRequestedCredentialToBePresented: IssuanceApi["getRequestedCrede
|
|
|
117
122
|
reason: requestObject.error.message,
|
|
118
123
|
});
|
|
119
124
|
}
|
|
120
|
-
return requestObject.data;
|
|
125
|
+
return requestObject.data.payload;
|
|
121
126
|
};
|
|
122
127
|
|
|
123
128
|
export const completeUserAuthorizationWithFormPostJwtMode: IssuanceApi["completeUserAuthorizationWithFormPostJwtMode"] =
|
|
@@ -10,6 +10,7 @@ import {
|
|
|
10
10
|
IssuerResponseErrorCodes,
|
|
11
11
|
ResponseErrorBuilder,
|
|
12
12
|
UnexpectedStatusCodeError,
|
|
13
|
+
UnimplementedFeatureError,
|
|
13
14
|
ValidationFailed,
|
|
14
15
|
} from "../../../utils/errors";
|
|
15
16
|
import { createDPopToken } from "../../../utils/dpop";
|
|
@@ -210,3 +211,8 @@ const handleObtainCredentialError = (e: unknown) => {
|
|
|
210
211
|
})
|
|
211
212
|
.buildFrom(e);
|
|
212
213
|
};
|
|
214
|
+
|
|
215
|
+
export const obtainCredentialsBatch: IssuanceApi["obtainCredentialsBatch"] =
|
|
216
|
+
() => {
|
|
217
|
+
throw new UnimplementedFeatureError("obtainCredentialsBatch", "1.0.0");
|
|
218
|
+
};
|
|
@@ -9,7 +9,10 @@ import {
|
|
|
9
9
|
getRequestedCredentialToBePresented,
|
|
10
10
|
} from "./03-complete-user-authorization";
|
|
11
11
|
import { authorizeAccess } from "./04-authorize-access";
|
|
12
|
-
import {
|
|
12
|
+
import {
|
|
13
|
+
obtainCredential,
|
|
14
|
+
obtainCredentialsBatch,
|
|
15
|
+
} from "./05-obtain-credential";
|
|
13
16
|
import { verifyAndParseCredential } from "./06-verify-and-parse-credential";
|
|
14
17
|
import { MRTDPoP } from "../mrtd-pop";
|
|
15
18
|
|
|
@@ -23,6 +26,7 @@ export const Issuance: IssuanceApi = {
|
|
|
23
26
|
completeUserAuthorizationWithFormPostJwtMode,
|
|
24
27
|
authorizeAccess,
|
|
25
28
|
obtainCredential,
|
|
29
|
+
obtainCredentialsBatch,
|
|
26
30
|
verifyAndParseCredential,
|
|
27
31
|
MRTDPoP,
|
|
28
32
|
};
|
|
@@ -16,11 +16,11 @@ import { AuthorizationError, AuthorizationIdpError } from "../common/errors";
|
|
|
16
16
|
import { LogLevel, Logger } from "../../../utils/logging";
|
|
17
17
|
import { RemotePresentation as RemotePresentationFlow } from "../../presentation/v1.3.3";
|
|
18
18
|
import { partialCallbacks } from "../../../utils/callbacks";
|
|
19
|
+
import { sdkConfigV1_3 } from "../../../utils/config";
|
|
19
20
|
import {
|
|
20
21
|
IoWalletError,
|
|
21
22
|
sdkUnexpectedStatusCodeToIssuerError,
|
|
22
23
|
} from "../../../utils/errors";
|
|
23
|
-
import { sdkConfigV1_3 } from "../../../utils/config";
|
|
24
24
|
import type { IssuanceApi } from "../api";
|
|
25
25
|
import { mapToRequestObject } from "./mappers";
|
|
26
26
|
import type { RemotePresentation } from "../../presentation";
|