@pagopa/io-react-native-wallet 1.1.2 → 1.2.2
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/presentation/01-start-flow.js +7 -5
- package/lib/commonjs/credential/presentation/01-start-flow.js.map +1 -1
- package/lib/commonjs/credential/presentation/03-get-request-object.js +47 -0
- package/lib/commonjs/credential/presentation/03-get-request-object.js.map +1 -0
- package/lib/commonjs/credential/presentation/04-retrieve-rp-jwks.js +82 -0
- package/lib/commonjs/credential/presentation/04-retrieve-rp-jwks.js.map +1 -0
- package/lib/commonjs/credential/presentation/05-verify-request-object.js +35 -0
- package/lib/commonjs/credential/presentation/05-verify-request-object.js.map +1 -0
- package/lib/commonjs/credential/presentation/06-fetch-presentation-definition.js +63 -0
- package/lib/commonjs/credential/presentation/06-fetch-presentation-definition.js.map +1 -0
- package/lib/commonjs/credential/presentation/07-evaluate-input-descriptor.js +169 -0
- package/lib/commonjs/credential/presentation/07-evaluate-input-descriptor.js.map +1 -0
- package/lib/commonjs/credential/presentation/08-send-authorization-response.js +202 -0
- package/lib/commonjs/credential/presentation/08-send-authorization-response.js.map +1 -0
- package/lib/commonjs/credential/presentation/README.md +43 -4
- package/lib/commonjs/credential/presentation/errors.js +52 -1
- package/lib/commonjs/credential/presentation/errors.js.map +1 -1
- package/lib/commonjs/credential/presentation/index.js +27 -6
- package/lib/commonjs/credential/presentation/index.js.map +1 -1
- package/lib/commonjs/credential/presentation/types.js +69 -4
- package/lib/commonjs/credential/presentation/types.js.map +1 -1
- package/lib/commonjs/entity/trust/types.js +4 -1
- package/lib/commonjs/entity/trust/types.js.map +1 -1
- package/lib/module/credential/presentation/01-start-flow.js +8 -6
- package/lib/module/credential/presentation/01-start-flow.js.map +1 -1
- package/lib/module/credential/presentation/03-get-request-object.js +39 -0
- package/lib/module/credential/presentation/03-get-request-object.js.map +1 -0
- package/lib/module/credential/presentation/04-retrieve-rp-jwks.js +75 -0
- package/lib/module/credential/presentation/04-retrieve-rp-jwks.js.map +1 -0
- package/lib/module/credential/presentation/05-verify-request-object.js +28 -0
- package/lib/module/credential/presentation/05-verify-request-object.js.map +1 -0
- package/lib/module/credential/presentation/06-fetch-presentation-definition.js +56 -0
- package/lib/module/credential/presentation/06-fetch-presentation-definition.js.map +1 -0
- package/lib/module/credential/presentation/07-evaluate-input-descriptor.js +161 -0
- package/lib/module/credential/presentation/07-evaluate-input-descriptor.js.map +1 -0
- package/lib/module/credential/presentation/08-send-authorization-response.js +188 -0
- package/lib/module/credential/presentation/08-send-authorization-response.js.map +1 -0
- package/lib/module/credential/presentation/README.md +43 -4
- package/lib/module/credential/presentation/errors.js +48 -0
- package/lib/module/credential/presentation/errors.js.map +1 -1
- package/lib/module/credential/presentation/index.js +7 -4
- package/lib/module/credential/presentation/index.js.map +1 -1
- package/lib/module/credential/presentation/types.js +67 -3
- package/lib/module/credential/presentation/types.js.map +1 -1
- package/lib/module/entity/trust/types.js +4 -1
- package/lib/module/entity/trust/types.js.map +1 -1
- package/lib/typescript/credential/presentation/01-start-flow.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/{04-get-request-object.d.ts → 03-get-request-object.d.ts} +3 -5
- package/lib/typescript/credential/presentation/03-get-request-object.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/{03-retrieve-jwks.d.ts → 04-retrieve-rp-jwks.d.ts} +5 -4
- package/lib/typescript/credential/presentation/04-retrieve-rp-jwks.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/05-verify-request-object.d.ts +8 -0
- package/lib/typescript/credential/presentation/05-verify-request-object.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/06-fetch-presentation-definition.d.ts +26 -0
- package/lib/typescript/credential/presentation/06-fetch-presentation-definition.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/07-evaluate-input-descriptor.d.ts +27 -0
- package/lib/typescript/credential/presentation/07-evaluate-input-descriptor.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/08-send-authorization-response.d.ts +99 -0
- package/lib/typescript/credential/presentation/08-send-authorization-response.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/errors.d.ts +33 -0
- package/lib/typescript/credential/presentation/errors.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/index.d.ts +8 -5
- package/lib/typescript/credential/presentation/index.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/types.d.ts +612 -9
- package/lib/typescript/credential/presentation/types.d.ts.map +1 -1
- package/lib/typescript/entity/trust/index.d.ts +152 -0
- package/lib/typescript/entity/trust/index.d.ts.map +1 -1
- package/lib/typescript/entity/trust/types.d.ts +2088 -0
- package/lib/typescript/entity/trust/types.d.ts.map +1 -1
- package/package.json +5 -1
- package/src/credential/presentation/01-start-flow.ts +10 -6
- package/src/credential/presentation/{04-get-request-object.ts → 03-get-request-object.ts} +6 -51
- package/src/credential/presentation/{03-retrieve-jwks.ts → 04-retrieve-rp-jwks.ts} +39 -24
- package/src/credential/presentation/05-verify-request-object.ts +35 -0
- package/src/credential/presentation/06-fetch-presentation-definition.ts +78 -0
- package/src/credential/presentation/07-evaluate-input-descriptor.ts +204 -0
- package/src/credential/presentation/08-send-authorization-response.ts +251 -0
- package/src/credential/presentation/README.md +43 -4
- package/src/credential/presentation/errors.ts +48 -0
- package/src/credential/presentation/index.ts +27 -9
- package/src/credential/presentation/types.ts +59 -3
- package/src/entity/trust/types.ts +3 -0
- package/lib/commonjs/credential/presentation/03-retrieve-jwks.js +0 -68
- package/lib/commonjs/credential/presentation/03-retrieve-jwks.js.map +0 -1
- package/lib/commonjs/credential/presentation/04-get-request-object.js +0 -82
- package/lib/commonjs/credential/presentation/04-get-request-object.js.map +0 -1
- package/lib/commonjs/credential/presentation/05-send-authorization-response.js +0 -139
- package/lib/commonjs/credential/presentation/05-send-authorization-response.js.map +0 -1
- package/lib/module/credential/presentation/03-retrieve-jwks.js +0 -61
- package/lib/module/credential/presentation/03-retrieve-jwks.js.map +0 -1
- package/lib/module/credential/presentation/04-get-request-object.js +0 -74
- package/lib/module/credential/presentation/04-get-request-object.js.map +0 -1
- package/lib/module/credential/presentation/05-send-authorization-response.js +0 -128
- package/lib/module/credential/presentation/05-send-authorization-response.js.map +0 -1
- package/lib/typescript/credential/presentation/03-retrieve-jwks.d.ts.map +0 -1
- package/lib/typescript/credential/presentation/04-get-request-object.d.ts.map +0 -1
- package/lib/typescript/credential/presentation/05-send-authorization-response.d.ts +0 -34
- package/lib/typescript/credential/presentation/05-send-authorization-response.d.ts.map +0 -1
- package/src/credential/presentation/05-send-authorization-response.ts +0 -168
|
@@ -60,15 +60,54 @@ const { requestURI, clientId } = Credential.Presentation.startFlowFromQR(qrcode)
|
|
|
60
60
|
// If use trust federation: Evaluate issuer trust
|
|
61
61
|
const { rpConf } = await Credential.Presentation.evaluateRelyingPartyTrust(clientId);
|
|
62
62
|
|
|
63
|
+
const { requestObjectEncodedJwt } =
|
|
64
|
+
await Credential.Presentation.getRequestObject(requestURI, {
|
|
65
|
+
wiaCryptoContext: wiaCryptoContext,
|
|
66
|
+
appFetch: appFetch,
|
|
67
|
+
walletInstanceAttestation: walletInstanceAttestation,
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
// Retrieve RP JWK
|
|
63
71
|
// If use trust federation: Fetch Jwks from rpConf
|
|
64
72
|
const jwks = await Credential.Presentation.fetchJwksFromConfig(rpConf);
|
|
65
73
|
|
|
66
|
-
// If not use trust: Fetch Jwks from
|
|
67
|
-
const jwks = await Credential.Presentation.
|
|
68
|
-
|
|
69
|
-
appFetch
|
|
74
|
+
// If not use trust: Fetch Jwks from request object
|
|
75
|
+
const jwks = await Credential.Presentation.fetchJwksFromRequestObject(
|
|
76
|
+
requestObjectEncodedJwt,
|
|
77
|
+
{ context: { appFetch } }
|
|
70
78
|
);
|
|
71
79
|
|
|
80
|
+
// Verify signature Request Object
|
|
81
|
+
const { requestObject } =
|
|
82
|
+
await Credential.Presentation.verifyRequestObjectSignature(
|
|
83
|
+
requestObjectEncodedJwt,
|
|
84
|
+
jwks.keys
|
|
85
|
+
);
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
const { presentationDefinition } = await Credential.Presentation.fetchPresentDefinition(
|
|
89
|
+
requestObject,
|
|
90
|
+
{
|
|
91
|
+
appFetch: appFetch,
|
|
92
|
+
},
|
|
93
|
+
rpConf // If trust federation is used
|
|
94
|
+
);
|
|
95
|
+
|
|
96
|
+
// For each credential, find it and evaluate input descriptor and disclosures
|
|
97
|
+
const { requiredDisclosures } = Credential.Presentation.evaluateInputDescriptionForSdJwt4VC(
|
|
98
|
+
inputDescriptor,
|
|
99
|
+
credential.payload,
|
|
100
|
+
disclosures
|
|
101
|
+
);
|
|
102
|
+
|
|
103
|
+
// After confirm disclosures in app
|
|
104
|
+
const authResponse = Credential.Presentation.sendAuthorizationResponse(
|
|
105
|
+
requestObject,
|
|
106
|
+
presentationDefinition,
|
|
107
|
+
jwks,
|
|
108
|
+
[credential, disclosuresRequested, { appFetch: appFetch }]
|
|
109
|
+
);
|
|
110
|
+
|
|
72
111
|
|
|
73
112
|
```
|
|
74
113
|
|
|
@@ -39,4 +39,52 @@ export class NoSuitableKeysFoundInEntityConfiguration extends IoWalletError {
|
|
|
39
39
|
super(message);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* When a QR code is not valid.
|
|
45
|
+
*
|
|
46
|
+
*/
|
|
47
|
+
export class InvalidQRCodeError extends IoWalletError {
|
|
48
|
+
code = "ERR_INVALID_QR_CODE";
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* @param detail A description of why the QR code is considered invalid.
|
|
52
|
+
*/
|
|
53
|
+
constructor(detail) {
|
|
54
|
+
const message = `QR code is not valid: ${detail}.`;
|
|
55
|
+
super(message);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* When the entity is unverified because the Relying Party is not trusted.
|
|
61
|
+
*
|
|
62
|
+
*/
|
|
63
|
+
export class UnverifiedEntityError extends IoWalletError {
|
|
64
|
+
code = "ERR_UNVERIFIED_RP_ENTITY";
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* @param reason A description of why the entity cannot be verified.
|
|
68
|
+
*/
|
|
69
|
+
constructor(reason) {
|
|
70
|
+
const message = `Unverified entity: ${reason}.`;
|
|
71
|
+
super(message);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* When some required data is missing to continue because certain attributes are not contained inside the wallet.
|
|
77
|
+
*
|
|
78
|
+
*/
|
|
79
|
+
export class MissingDataError extends IoWalletError {
|
|
80
|
+
code = "ERR_MISSING_DATA";
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* @param missingAttributes An array or description of the attributes that are missing.
|
|
84
|
+
*/
|
|
85
|
+
constructor(missingAttributes) {
|
|
86
|
+
const message = `Some required data is missing: ${missingAttributes}.`;
|
|
87
|
+
super(message);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
42
90
|
//# sourceMappingURL=errors.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["IoWalletError","serializeAttrs","AuthRequestDecodeError","code","constructor","message","claim","arguments","length","undefined","reason","NoSuitableKeysFoundInEntityConfiguration","scenario"],"sourceRoot":"../../../../src","sources":["credential/presentation/errors.ts"],"mappings":"AAAA,SAASA,aAAa,EAAEC,cAAc,QAAQ,oBAAoB;;AAElE;AACA;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,SAASF,aAAa,CAAC;EACxDG,IAAI,GAAG,oDAAoD;;EAE3D;;EAGA;;EAGAC,WAAWA,CACTC,OAAe,EAGf;IAAA,IAFAC,KAAa,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,aAAa;IAAA,IAC7BG,MAAc,GAAAH,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,aAAa;IAE9B,KAAK,CAACN,cAAc,CAAC;MAAEI,OAAO;MAAEC,KAAK;MAAEI;IAAO,CAAC,CAAC,CAAC;IACjD,IAAI,CAACJ,KAAK,GAAGA,KAAK;IAClB,IAAI,CAACI,MAAM,GAAGA,MAAM;EACtB;AACF;;AAEA;AACA;AACA;AACA;AACA,OAAO,MAAMC,wCAAwC,SAASX,aAAa,CAAC;EAC1EG,IAAI,GAAG,gCAAgC;;EAEvC;AACF;AACA;EACEC,WAAWA,CAACQ,QAAgB,EAAE;IAC5B,MAAMP,OAAO,GAAI,0DAAyDO,QAAS,IAAG;IACtF,KAAK,CAACP,OAAO,CAAC;EAChB;AACF"}
|
|
1
|
+
{"version":3,"names":["IoWalletError","serializeAttrs","AuthRequestDecodeError","code","constructor","message","claim","arguments","length","undefined","reason","NoSuitableKeysFoundInEntityConfiguration","scenario","InvalidQRCodeError","detail","UnverifiedEntityError","MissingDataError","missingAttributes"],"sourceRoot":"../../../../src","sources":["credential/presentation/errors.ts"],"mappings":"AAAA,SAASA,aAAa,EAAEC,cAAc,QAAQ,oBAAoB;;AAElE;AACA;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,SAASF,aAAa,CAAC;EACxDG,IAAI,GAAG,oDAAoD;;EAE3D;;EAGA;;EAGAC,WAAWA,CACTC,OAAe,EAGf;IAAA,IAFAC,KAAa,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,aAAa;IAAA,IAC7BG,MAAc,GAAAH,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,aAAa;IAE9B,KAAK,CAACN,cAAc,CAAC;MAAEI,OAAO;MAAEC,KAAK;MAAEI;IAAO,CAAC,CAAC,CAAC;IACjD,IAAI,CAACJ,KAAK,GAAGA,KAAK;IAClB,IAAI,CAACI,MAAM,GAAGA,MAAM;EACtB;AACF;;AAEA;AACA;AACA;AACA;AACA,OAAO,MAAMC,wCAAwC,SAASX,aAAa,CAAC;EAC1EG,IAAI,GAAG,gCAAgC;;EAEvC;AACF;AACA;EACEC,WAAWA,CAACQ,QAAgB,EAAE;IAC5B,MAAMP,OAAO,GAAI,0DAAyDO,QAAS,IAAG;IACtF,KAAK,CAACP,OAAO,CAAC;EAChB;AACF;;AAEA;AACA;AACA;AACA;AACA,OAAO,MAAMQ,kBAAkB,SAASb,aAAa,CAAC;EACpDG,IAAI,GAAG,qBAAqB;;EAE5B;AACF;AACA;EACEC,WAAWA,CAACU,MAAc,EAAE;IAC1B,MAAMT,OAAO,GAAI,yBAAwBS,MAAO,GAAE;IAClD,KAAK,CAACT,OAAO,CAAC;EAChB;AACF;;AAEA;AACA;AACA;AACA;AACA,OAAO,MAAMU,qBAAqB,SAASf,aAAa,CAAC;EACvDG,IAAI,GAAG,0BAA0B;;EAEjC;AACF;AACA;EACEC,WAAWA,CAACM,MAAc,EAAE;IAC1B,MAAML,OAAO,GAAI,sBAAqBK,MAAO,GAAE;IAC/C,KAAK,CAACL,OAAO,CAAC;EAChB;AACF;;AAEA;AACA;AACA;AACA;AACA,OAAO,MAAMW,gBAAgB,SAAShB,aAAa,CAAC;EAClDG,IAAI,GAAG,kBAAkB;;EAEzB;AACF;AACA;EACEC,WAAWA,CAACa,iBAAyB,EAAE;IACrC,MAAMZ,OAAO,GAAI,kCAAiCY,iBAAkB,GAAE;IACtE,KAAK,CAACZ,OAAO,CAAC;EAChB;AACF"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import { startFlowFromQR } from "./01-start-flow";
|
|
2
2
|
import { evaluateRelyingPartyTrust } from "./02-evaluate-rp-trust";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { getRequestObject } from "./03-get-request-object";
|
|
4
|
+
import { fetchJwksFromRequestObject, fetchJwksFromConfig } from "./04-retrieve-rp-jwks";
|
|
5
|
+
import { verifyRequestObjectSignature } from "./05-verify-request-object";
|
|
6
|
+
import { fetchPresentDefinition } from "./06-fetch-presentation-definition";
|
|
7
|
+
import { evaluateInputDescriptorForSdJwt4VC } from "./07-evaluate-input-descriptor";
|
|
8
|
+
import { sendAuthorizationResponse } from "./08-send-authorization-response";
|
|
6
9
|
import * as Errors from "./errors";
|
|
7
|
-
export { startFlowFromQR, evaluateRelyingPartyTrust,
|
|
10
|
+
export { startFlowFromQR, evaluateRelyingPartyTrust, getRequestObject, fetchJwksFromRequestObject, fetchJwksFromConfig, verifyRequestObjectSignature, fetchPresentDefinition, evaluateInputDescriptorForSdJwt4VC, sendAuthorizationResponse, Errors };
|
|
8
11
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["startFlowFromQR","evaluateRelyingPartyTrust","
|
|
1
|
+
{"version":3,"names":["startFlowFromQR","evaluateRelyingPartyTrust","getRequestObject","fetchJwksFromRequestObject","fetchJwksFromConfig","verifyRequestObjectSignature","fetchPresentDefinition","evaluateInputDescriptorForSdJwt4VC","sendAuthorizationResponse","Errors"],"sourceRoot":"../../../../src","sources":["credential/presentation/index.ts"],"mappings":"AAAA,SAASA,eAAe,QAAwB,iBAAiB;AACjE,SACEC,yBAAyB,QAEpB,wBAAwB;AAC/B,SACEC,gBAAgB,QAEX,yBAAyB;AAChC,SACEC,0BAA0B,EAC1BC,mBAAmB,QAEd,uBAAuB;AAC9B,SACEC,4BAA4B,QAEvB,4BAA4B;AACnC,SACEC,sBAAsB,QAEjB,oCAAoC;AAC3C,SACEC,kCAAkC,QAE7B,gCAAgC;AACvC,SACEC,yBAAyB,QAEpB,kCAAkC;AACzC,OAAO,KAAKC,MAAM,MAAM,UAAU;AAElC,SACET,eAAe,EACfC,yBAAyB,EACzBC,gBAAgB,EAChBC,0BAA0B,EAC1BC,mBAAmB,EACnBC,4BAA4B,EAC5BC,sBAAsB,EACtBC,kCAAkC,EAClCC,yBAAyB,EACzBC,MAAM"}
|
|
@@ -5,19 +5,83 @@ import * as z from "zod";
|
|
|
5
5
|
* A pair that associate a tokenized Verified Credential with the claims presented or requested to present.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
+
const Fields = z.object({
|
|
9
|
+
path: z.array(z.string().min(1)),
|
|
10
|
+
// Array of JSONPath string expressions
|
|
11
|
+
id: z.string().optional(),
|
|
12
|
+
// Unique string ID
|
|
13
|
+
purpose: z.string().optional(),
|
|
14
|
+
// Purpose of the field
|
|
15
|
+
name: z.string().optional(),
|
|
16
|
+
// Human-friendly name
|
|
17
|
+
filter: z.any().optional(),
|
|
18
|
+
// JSON Schema descriptor for filtering
|
|
19
|
+
optional: z.boolean().optional(),
|
|
20
|
+
// Boolean indicating if the field is optional
|
|
21
|
+
intent_to_retain: z.boolean().optional() // Boolean indicating that the Verifier intends to retain the Claim's data being requested
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
// Define the Constraints Object Schema
|
|
25
|
+
const Constraints = z.object({
|
|
26
|
+
fields: z.array(Fields).optional(),
|
|
27
|
+
// Array of Field Objects
|
|
28
|
+
limit_disclosure: z.enum(["required", "preferred"]).optional() // Limit disclosure property
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
// Define the Input Descriptor Object Schema
|
|
32
|
+
|
|
33
|
+
export const InputDescriptor = z.object({
|
|
34
|
+
id: z.string().min(1),
|
|
35
|
+
// Mandatory unique string ID
|
|
36
|
+
name: z.string().optional(),
|
|
37
|
+
// Human-friendly name
|
|
38
|
+
purpose: z.string().optional(),
|
|
39
|
+
// Purpose of the schema
|
|
40
|
+
format: z.record(z.string(), z.any()).optional(),
|
|
41
|
+
// Object with Claim Format Designations
|
|
42
|
+
constraints: Constraints,
|
|
43
|
+
// Constraints Object (mandatory)
|
|
44
|
+
group: z.string().optional() // Match one of the grouping strings listed in the "from" values of a Submission Requirement Rule
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
const SubmissionRequirement = z.object({
|
|
48
|
+
name: z.string().optional(),
|
|
49
|
+
purpose: z.string().optional(),
|
|
50
|
+
rule: z.string(),
|
|
51
|
+
// "all": all group's rules must be present, or "pick": at least group's "count" rules must be present
|
|
52
|
+
from: z.string().optional(),
|
|
53
|
+
// MUST contain either a "from" or "from_nested" property
|
|
54
|
+
from_nested: z.array(z.object({
|
|
55
|
+
name: z.string().optional(),
|
|
56
|
+
purpose: z.string().optional(),
|
|
57
|
+
rule: z.string(),
|
|
58
|
+
from: z.string()
|
|
59
|
+
})).optional(),
|
|
60
|
+
count: z.number().optional()
|
|
61
|
+
//"count", "min", and "max" may be present with a "pick" rule
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
export const PresentationDefinition = z.object({
|
|
65
|
+
id: z.string(),
|
|
66
|
+
name: z.string().optional(),
|
|
67
|
+
purpose: z.string().optional(),
|
|
68
|
+
input_descriptors: z.array(InputDescriptor),
|
|
69
|
+
submission_requirements: z.array(SubmissionRequirement).optional()
|
|
70
|
+
});
|
|
8
71
|
export const RequestObject = z.object({
|
|
9
72
|
iss: z.string().optional(),
|
|
10
73
|
//optional by RFC 7519, mandatory for Potential
|
|
11
|
-
iat: UnixTime,
|
|
74
|
+
iat: UnixTime.optional(),
|
|
12
75
|
exp: UnixTime.optional(),
|
|
13
76
|
state: z.string(),
|
|
14
77
|
nonce: z.string(),
|
|
15
78
|
response_uri: z.string(),
|
|
16
79
|
response_type: z.literal("vp_token"),
|
|
17
|
-
response_mode: z.
|
|
80
|
+
response_mode: z.enum(["direct_post.jwt", "direct_post"]),
|
|
18
81
|
client_id: z.string(),
|
|
19
82
|
client_id_scheme: z.string(),
|
|
20
83
|
// previous z.literal("entity_id"),
|
|
21
|
-
scope: z.string()
|
|
84
|
+
scope: z.string().optional(),
|
|
85
|
+
presentation_definition: PresentationDefinition.optional()
|
|
22
86
|
});
|
|
23
87
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["UnixTime","z","
|
|
1
|
+
{"version":3,"names":["UnixTime","z","Fields","object","path","array","string","min","id","optional","purpose","name","filter","any","boolean","intent_to_retain","Constraints","fields","limit_disclosure","enum","InputDescriptor","format","record","constraints","group","SubmissionRequirement","rule","from","from_nested","count","number","PresentationDefinition","input_descriptors","submission_requirements","RequestObject","iss","iat","exp","state","nonce","response_uri","response_type","literal","response_mode","client_id","client_id_scheme","scope","presentation_definition"],"sourceRoot":"../../../../src","sources":["credential/presentation/types.ts"],"mappings":"AACA,SAASA,QAAQ,QAAQ,oBAAoB;AAC7C,OAAO,KAAKC,CAAC,MAAM,KAAK;;AAExB;AACA;AACA;;AAOA,MAAMC,MAAM,GAAGD,CAAC,CAACE,MAAM,CAAC;EACtBC,IAAI,EAAEH,CAAC,CAACI,KAAK,CAACJ,CAAC,CAACK,MAAM,CAAC,CAAC,CAACC,GAAG,CAAC,CAAC,CAAC,CAAC;EAAE;EAClCC,EAAE,EAAEP,CAAC,CAACK,MAAM,CAAC,CAAC,CAACG,QAAQ,CAAC,CAAC;EAAE;EAC3BC,OAAO,EAAET,CAAC,CAACK,MAAM,CAAC,CAAC,CAACG,QAAQ,CAAC,CAAC;EAAE;EAChCE,IAAI,EAAEV,CAAC,CAACK,MAAM,CAAC,CAAC,CAACG,QAAQ,CAAC,CAAC;EAAE;EAC7BG,MAAM,EAAEX,CAAC,CAACY,GAAG,CAAC,CAAC,CAACJ,QAAQ,CAAC,CAAC;EAAE;EAC5BA,QAAQ,EAAER,CAAC,CAACa,OAAO,CAAC,CAAC,CAACL,QAAQ,CAAC,CAAC;EAAE;EAClCM,gBAAgB,EAAEd,CAAC,CAACa,OAAO,CAAC,CAAC,CAACL,QAAQ,CAAC,CAAC,CAAE;AAC5C,CAAC,CAAC;;AAEF;AACA,MAAMO,WAAW,GAAGf,CAAC,CAACE,MAAM,CAAC;EAC3Bc,MAAM,EAAEhB,CAAC,CAACI,KAAK,CAACH,MAAM,CAAC,CAACO,QAAQ,CAAC,CAAC;EAAE;EACpCS,gBAAgB,EAAEjB,CAAC,CAACkB,IAAI,CAAC,CAAC,UAAU,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iB,EAAE,aAAa,CAAC,CAAC;EACzDyB,SAAS,EAAE3C,CAAC,CAACK,MAAM,CAAC,CAAC;EACrBuC,gBAAgB,EAAE5C,CAAC,CAACK,MAAM,CAAC,CAAC;EAAE;EAC9BwC,KAAK,EAAE7C,CAAC,CAACK,MAAM,CAAC,CAAC,CAACG,QAAQ,CAAC,CAAC;EAC5BsC,uBAAuB,EAAEhB,sBAAsB,CAACtB,QAAQ,CAAC;AAC3D,CAAC,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { UnixTime } from "../../sd-jwt/types";
|
|
2
2
|
import { JWK } from "../../utils/jwk";
|
|
3
3
|
import * as z from "zod";
|
|
4
|
+
import { PresentationDefinition } from "../../credential/presentation/types";
|
|
4
5
|
export const TrustMark = z.object({
|
|
5
6
|
id: z.string(),
|
|
6
7
|
trust_mark: z.string()
|
|
@@ -12,7 +13,9 @@ const RelyingPartyMetadata = z.object({
|
|
|
12
13
|
jwks: z.object({
|
|
13
14
|
keys: z.array(JWK)
|
|
14
15
|
}),
|
|
15
|
-
contacts: z.array(z.string()).optional()
|
|
16
|
+
contacts: z.array(z.string()).optional(),
|
|
17
|
+
presentation_definition: PresentationDefinition.optional(),
|
|
18
|
+
presentation_definition_uri: z.string().optional()
|
|
16
19
|
});
|
|
17
20
|
//.passthrough();
|
|
18
21
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["UnixTime","JWK","z","TrustMark","object","id","string","trust_mark","RelyingPartyMetadata","application_type","optional","client_id","client_name","jwks","keys","array","contacts","CredentialDisplayMetadata","name","locale","logo","url","alt_text","background_color","text_color","CredentialIssuerDisplayMetadata","ClaimsMetadata","record","value_type","display","IssuanceErrorSupported","title","description","SupportedCredentialMetadata","format","union","literal","scope","claims","cryptographic_binding_methods_supported","credential_signing_alg_values_supported","authentic_source","issuance_errors_supported","EntityStatement","header","typ","alg","kid","payload","iss","sub","trust_marks","iat","number","exp","EntityConfigurationHeader","FederationEntityMetadata","federation_fetch_endpoint","federation_list_endpoint","federation_resolve_endpoint","federation_trust_mark_status_endpoint","federation_trust_mark_list_endpoint","organization_name","homepage_uri","policy_uri","logo_uri","passthrough","BaseEntityConfiguration","authority_hints","metadata","federation_entity","TrustAnchorEntityConfiguration","CredentialIssuerEntityConfiguration","and","openid_credential_issuer","credential_issuer","credential_endpoint","revocation_endpoint","status_attestation_endpoint","credential_configurations_supported","oauth_authorization_server","authorization_endpoint","pushed_authorization_request_endpoint","dpop_signing_alg_values_supported","token_endpoint","introspection_endpoint","client_registration_types_supported","code_challenge_methods_supported","authorization_details_types_supported","acr_values_supported","grant_types_supported","issuer","scopes_supported","request_parameter_supported","boolean","request_uri_parameter_supported","response_types_supported","response_modes_supported","subject_types_supported","token_endpoint_auth_methods_supported","token_endpoint_auth_signing_alg_values_supported","request_object_signing_alg_values_supported","wallet_relying_party","RelyingPartyEntityConfiguration","WalletProviderEntityConfiguration","wallet_provider","aal_values_supported","EntityConfiguration"],"sourceRoot":"../../../../src","sources":["entity/trust/types.ts"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,GAAG,QAAQ,iBAAiB;AACrC,OAAO,KAAKC,CAAC,MAAM,KAAK;AAExB,OAAO,MAAMC,SAAS,GAAGD,CAAC,CAACE,MAAM,CAAC;EAAEC,EAAE,EAAEH,CAAC,CAACI,MAAM,CAAC,CAAC;EAAEC,UAAU,EAAEL,CAAC,CAACI,MAAM,CAAC;AAAE,CAAC,CAAC;AAG7E,MAAME,oBAAoB,GAAGN,CAAC,CAACE,MAAM,CAAC;EACpCK,gBAAgB,EAAEP,CAAC,CAACI,MAAM,CAAC,CAAC,CAACI,QAAQ,CAAC,CAAC;EACvCC,SAAS,EAAET,CAAC,CAACI,MAAM,CAAC,CAAC,CAACI,QAAQ,CAAC,CAAC;EAChCE,WAAW,EAAEV,CAAC,CAACI,MAAM,CAAC,CAAC,CAACI,QAAQ,CAAC,CAAC;EAClCG,IAAI,EAAEX,CA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AC,CAACI,MAAM,CAAC,CAAC,CAAC,CAACI,QAAQ,CAAC,CAAC;QACpDgF,qBAAqB,EAAExF,CAAC,CAACa,KAAK,CAACb,CAAC,CAACI,MAAM,CAAC,CAAC,CAAC;QAC1C6F,qCAAqC,EAAEjG,CAAC,CAACa,KAAK,CAACb,CAAC,CAACI,MAAM,CAAC,CAAC,CAAC;QAC1D8F,gDAAgD,EAAElG,CAAC,CAACa,KAAK,CACvDb,CAAC,CAACI,MAAM,CAAC,CACX,CAAC;QACDO,IAAI,EAAEX,CAAC,CAACE,MAAM,CAAC;UAAEU,IAAI,EAAEZ,CAAC,CAACa,KAAK,CAACd,GAAG;QAAE,CAAC;MACvC,CAAC,CAAC,CACDiE,WAAW,CAAC;IACjB,CAAC;EACH,CAAC;AACH,CAAC,CACH,CAAC;;AAED;;AAEA,OAAO,MAAMyC,mBAAmB,GAAGzG,CAAC,CAACiC,KAAK,CACxC,CACEqE,iCAAiC,EACjChC,mCAAmC,EACnCD,8BAA8B,EAC9BgC,+BAA+B,CAChC,EACD;EACEvE,WAAW,EAAE;AACf,CACF,CAAC"}
|
|
1
|
+
{"version":3,"names":["UnixTime","JWK","z","PresentationDefinition","TrustMark","object","id","string","trust_mark","RelyingPartyMetadata","application_type","optional","client_id","client_name","jwks","keys","array","contacts","presentation_definition","presentation_definition_uri","CredentialDisplayMetadata","name","locale","logo","url","alt_text","background_color","text_color","CredentialIssuerDisplayMetadata","ClaimsMetadata","record","value_type","display","IssuanceErrorSupported","title","description","SupportedCredentialMetadata","format","union","literal","scope","claims","cryptographic_binding_methods_supported","credential_signing_alg_values_supported","authentic_source","issuance_errors_supported","EntityStatement","header","typ","alg","kid","payload","iss","sub","trust_marks","iat","number","exp","EntityConfigurationHeader","FederationEntityMetadata","federation_fetch_endpoint","federation_list_endpoint","federation_resolve_endpoint","federation_trust_mark_status_endpoint","federation_trust_mark_list_endpoint","organization_name","homepage_uri","policy_uri","logo_uri","passthrough","BaseEntityConfiguration","authority_hints","metadata","federation_entity","TrustAnchorEntityConfiguration","CredentialIssuerEntityConfiguration","and","openid_credential_issuer","credential_issuer","credential_endpoint","revocation_endpoint","status_attestation_endpoint","credential_configurations_supported","oauth_authorization_server","authorization_endpoint","pushed_authorization_request_endpoint","dpop_signing_alg_values_supported","token_endpoint","introspection_endpoint","client_registration_types_supported","code_challenge_methods_supported","authorization_details_types_supported","acr_values_supported","grant_types_supported","issuer","scopes_supported","request_parameter_supported","boolean","request_uri_parameter_supported","response_types_supported","response_modes_supported","subject_types_supported","token_endpoint_auth_methods_supported","token_endpoint_auth_signing_alg_values_supported","request_object_signing_alg_values_supported","wallet_relying_party","RelyingPartyEntityConfiguration","WalletProviderEntityConfiguration","wallet_provider","aal_values_supported","EntityConfiguration"],"sourceRoot":"../../../../src","sources":["entity/trust/types.ts"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,GAAG,QAAQ,iBAAiB;AACrC,OAAO,KAAKC,CAAC,MAAM,KAAK;AACxB,SAASC,sBAAsB,QAAQ,qCAAqC;AAE5E,OAAO,MAAMC,SAAS,GAAGF,CAAC,CAACG,MAAM,CAAC;EAAEC,EAAE,EAAEJ,CAAC,CAACK,MAAM,CAAC,CAAC;EAAEC,UAAU,EAAEN,CAAC,CAACK,MAAM,CAAC;AAAE,CAAC,CAAC;AAG7E,MAAME,oBAAoB,GAAGP,CAAC,CAACG,MAAM,CAAC;EACpCK,gBAAgB,EAAER,CAAC,CAACK,MAAM,CAAC,CAAC,CAACI,QAAQ,CAAC,CAAC;EACvCC,SAAS,EAAEV,CAAC,CAACK,MAAM,CAAC,CAAC,CAACI,QAAQ,CAAC,CAAC;EAChCE,WAAW,EAAEX,CAAC,CAACK,MAAM,CAAC,CAAC,CAACI,QAAQ,CAAC,CAAC;EAClCG,IAAI,EAAEZ,CAAC,CAACG,MAAM,CAAC;IAAEU,IAAI,EAAEb,CAAC,CAACc,KAAK,CAACf,GAAG;EAAE,CAAC,CAAC;EACtCgB,Q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C1BsG,oBAAoB,EAAE3G,CAAC,CAACc,KAAK,CAACd,CAAC,CAACK,MAAM,CAAC,CAAC,CAAC,CAACI,QAAQ,CAAC,CAAC;QACpDkF,qBAAqB,EAAE3F,CAAC,CAACc,KAAK,CAACd,CAAC,CAACK,MAAM,CAAC,CAAC,CAAC;QAC1C+F,qCAAqC,EAAEpG,CAAC,CAACc,KAAK,CAACd,CAAC,CAACK,MAAM,CAAC,CAAC,CAAC;QAC1DgG,gDAAgD,EAAErG,CAAC,CAACc,KAAK,CACvDd,CAAC,CAACK,MAAM,CAAC,CACX,CAAC;QACDO,IAAI,EAAEZ,CAAC,CAACG,MAAM,CAAC;UAAEU,IAAI,EAAEb,CAAC,CAACc,KAAK,CAACf,GAAG;QAAE,CAAC;MACvC,CAAC,CAAC,CACDoE,WAAW,CAAC;IACjB,CAAC;EACH,CAAC;AACH,CAAC,CACH,CAAC;;AAED;;AAEA,OAAO,MAAMyC,mBAAmB,GAAG5G,CAAC,CAACoC,KAAK,CACxC,CACEqE,iCAAiC,EACjChC,mCAAmC,EACnCD,8BAA8B,EAC9BgC,+BAA+B,CAChC,EACD;EACEvE,WAAW,EAAE;AACf,CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"01-start-flow.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/01-start-flow.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"01-start-flow.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/01-start-flow.ts"],"names":[],"mappings":"AAUA;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK;IACrE,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,EAAE,SAAS,CAAC,CAAC,MAAM,CAAC,CA+B/C,CAAC"}
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import { type CryptoContext } from "@pagopa/io-react-native-jwt";
|
|
2
|
-
import type { FetchJwks } from "./03-retrieve-jwks";
|
|
3
2
|
import { type Out } from "../../utils/misc";
|
|
4
3
|
import type { StartFlow } from "./01-start-flow";
|
|
5
|
-
import { RequestObject } from "./types";
|
|
6
4
|
export type GetRequestObject = (requestUri: Out<StartFlow>["requestURI"], context: {
|
|
7
5
|
wiaCryptoContext: CryptoContext;
|
|
8
6
|
appFetch?: GlobalFetch["fetch"];
|
|
9
7
|
walletInstanceAttestation: string;
|
|
10
|
-
}
|
|
11
|
-
|
|
8
|
+
}) => Promise<{
|
|
9
|
+
requestObjectEncodedJwt: string;
|
|
12
10
|
}>;
|
|
13
11
|
/**
|
|
14
12
|
* Obtain the Request Object for RP authentication
|
|
@@ -22,4 +20,4 @@ export type GetRequestObject = (requestUri: Out<StartFlow>["requestURI"], contex
|
|
|
22
20
|
* @returns The Request Object that describes the presentation
|
|
23
21
|
*/
|
|
24
22
|
export declare const getRequestObject: GetRequestObject;
|
|
25
|
-
//# sourceMappingURL=
|
|
23
|
+
//# sourceMappingURL=03-get-request-object.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"03-get-request-object.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/03-get-request-object.ts"],"names":[],"mappings":"AACA,OAAO,EAEL,KAAK,aAAa,EACnB,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAAoB,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEjD,MAAM,MAAM,gBAAgB,GAAG,CAC7B,UAAU,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC,YAAY,CAAC,EACxC,OAAO,EAAE;IACP,gBAAgB,EAAE,aAAa,CAAC;IAChC,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAChC,yBAAyB,EAAE,MAAM,CAAC;CACnC,KACE,OAAO,CAAC;IAAE,uBAAuB,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAElD;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB,EAAE,gBA2B9B,CAAC"}
|
package/lib/typescript/credential/presentation/{03-retrieve-jwks.d.ts → 04-retrieve-rp-jwks.d.ts}
RENAMED
|
@@ -12,15 +12,16 @@ export type FetchJwks<T extends Array<unknown> = []> = (...args: T) => Promise<{
|
|
|
12
12
|
}>;
|
|
13
13
|
/**
|
|
14
14
|
* Retrieves the JSON Web Key Set (JWKS) from the specified client's well-known endpoint.
|
|
15
|
+
* It is formed using `{issUrl.base}/.well-known/jar-issuer${issUrl.pah}` as explained in SD-JWT VC issuer metadata section
|
|
15
16
|
*
|
|
16
|
-
* @param
|
|
17
|
+
* @param requestObjectEncodedJwt - Request Object in JWT format.
|
|
17
18
|
* @param options - Optional context containing a custom fetch implementation.
|
|
18
19
|
* @param options.context - Optional context object.
|
|
19
20
|
* @param options.context.appFetch - Optional custom fetch function to use instead of the global `fetch`.
|
|
20
21
|
* @returns A promise resolving to an object containing an array of JWKs.
|
|
21
22
|
* @throws Will throw an error if the JWKS retrieval fails.
|
|
22
23
|
*/
|
|
23
|
-
export declare const
|
|
24
|
+
export declare const fetchJwksFromRequestObject: FetchJwks<[
|
|
24
25
|
string,
|
|
25
26
|
{
|
|
26
27
|
context?: {
|
|
@@ -36,6 +37,6 @@ export declare const fetchJwksFromUri: FetchJwks<[
|
|
|
36
37
|
* @throws Will throw an error if the configuration is invalid or if JWKS is not found.
|
|
37
38
|
*/
|
|
38
39
|
export declare const fetchJwksFromConfig: FetchJwks<[
|
|
39
|
-
RelyingPartyEntityConfiguration
|
|
40
|
+
RelyingPartyEntityConfiguration["payload"]["metadata"]
|
|
40
41
|
]>;
|
|
41
|
-
//# sourceMappingURL=
|
|
42
|
+
//# sourceMappingURL=04-retrieve-rp-jwks.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"04-retrieve-rp-jwks.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/04-retrieve-rp-jwks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,+BAA+B,EAAE,MAAM,0BAA0B,CAAC;AAI3E;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,CAAC,CAAC,SAAS,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC;IAC7E,IAAI,EAAE,GAAG,EAAE,CAAC;CACb,CAAC,CAAC;AAEH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,0BAA0B,EAAE,SAAS,CAChD;IAAC,MAAM;IAAE;QAAE,OAAO,CAAC,EAAE;YAAE,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAA;SAAE,CAAA;KAAE;CAAC,CAqC5D,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,mBAAmB,EAAE,SAAS,CACzC;IAAC,+BAA+B,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC;CAAC,CAWzD,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { RequestObject } from "./types";
|
|
2
|
+
import type { FetchJwks } from "./04-retrieve-rp-jwks";
|
|
3
|
+
import { type Out } from "../../utils/misc";
|
|
4
|
+
export type VerifyRequestObjectSignature = (requestObjectEncodedJwt: string, jwkKeys?: Out<FetchJwks>["keys"]) => Promise<{
|
|
5
|
+
requestObject: RequestObject;
|
|
6
|
+
}>;
|
|
7
|
+
export declare const verifyRequestObjectSignature: VerifyRequestObjectSignature;
|
|
8
|
+
//# sourceMappingURL=05-verify-request-object.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"05-verify-request-object.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/05-verify-request-object.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAE5C,MAAM,MAAM,4BAA4B,GAAG,CACzC,uBAAuB,EAAE,MAAM,EAC/B,OAAO,CAAC,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,KAC7B,OAAO,CAAC;IAAE,aAAa,EAAE,aAAa,CAAA;CAAE,CAAC,CAAC;AAE/C,eAAO,MAAM,4BAA4B,EAAE,4BAsBxC,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { PresentationDefinition, RequestObject } from "./types";
|
|
2
|
+
import { RelyingPartyEntityConfiguration } from "../../entity/trust/types";
|
|
3
|
+
export type FetchPresentationDefinition = (requestObject: RequestObject, context?: {
|
|
4
|
+
appFetch?: GlobalFetch["fetch"];
|
|
5
|
+
}, rpConf?: RelyingPartyEntityConfiguration["payload"]["metadata"]) => Promise<{
|
|
6
|
+
presentationDefinition: PresentationDefinition;
|
|
7
|
+
}>;
|
|
8
|
+
/**
|
|
9
|
+
* Retrieves a PresentationDefinition based on the given parameters.
|
|
10
|
+
*
|
|
11
|
+
* The method attempts the following strategies in order:
|
|
12
|
+
* 1. Checks if `presentation_definition` is directly available in the request object.
|
|
13
|
+
* 2. Fetches the `presentation_definition` from the URI provided in the relying party configuration.
|
|
14
|
+
* 3. Uses a pre-configured `presentation_definition` from the relying party configuration if the `scope` is present in the request object.
|
|
15
|
+
*
|
|
16
|
+
* If none of the above conditions are met, the function throws an error indicating the definition could not be found.
|
|
17
|
+
*
|
|
18
|
+
* @param {RequestObject} requestObject - The request object containing the presentation definition or references to it.
|
|
19
|
+
* @param {RelyingPartyEntityConfiguration["payload"]["metadata"]} [rpConf] - Optional relying party configuration.
|
|
20
|
+
* @param {Object} [context] - Optional context for providing a custom fetch implementation.
|
|
21
|
+
* @param {GlobalFetch["fetch"]} [context.appFetch] - Custom fetch function, defaults to global `fetch`.
|
|
22
|
+
* @returns {Promise<{ presentationDefinition: PresentationDefinition }>} - Resolves with the presentation definition.
|
|
23
|
+
* @throws {Error} - Throws if the presentation definition cannot be found or fetched.
|
|
24
|
+
*/
|
|
25
|
+
export declare const fetchPresentDefinition: FetchPresentationDefinition;
|
|
26
|
+
//# sourceMappingURL=06-fetch-presentation-definition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"06-fetch-presentation-definition.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/06-fetch-presentation-definition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAChE,OAAO,EAAE,+BAA+B,EAAE,MAAM,0BAA0B,CAAC;AAG3E,MAAM,MAAM,2BAA2B,GAAG,CACxC,aAAa,EAAE,aAAa,EAC5B,OAAO,CAAC,EAAE;IACR,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,EACD,MAAM,CAAC,EAAE,+BAA+B,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,KAC5D,OAAO,CAAC;IACX,sBAAsB,EAAE,sBAAsB,CAAC;CAChD,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,sBAAsB,EAAE,2BA8CpC,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { InputDescriptor } from "./types";
|
|
2
|
+
import { SdJwt4VC, type DisclosureWithEncoded } from "../../sd-jwt/types";
|
|
3
|
+
export type EvaluatedDisclosures = {
|
|
4
|
+
requiredDisclosures: DisclosureWithEncoded[];
|
|
5
|
+
optionalDisclosures: DisclosureWithEncoded[];
|
|
6
|
+
};
|
|
7
|
+
export type EvaluateInputDescriptorSdJwt4VC = (inputDescriptor: InputDescriptor, payloadCredential: SdJwt4VC["payload"], disclosures: DisclosureWithEncoded[]) => EvaluatedDisclosures;
|
|
8
|
+
/**
|
|
9
|
+
* Evaluates an InputDescriptor for an SD-JWT-based verifiable credential.
|
|
10
|
+
*
|
|
11
|
+
* - Checks each field in the InputDescriptor against the provided `payloadCredential`
|
|
12
|
+
* and `disclosures` (selectively disclosed claims).
|
|
13
|
+
* - Validates whether required fields are present (unless marked optional)
|
|
14
|
+
* and match any specified JSONPath.
|
|
15
|
+
* - If a field includes a JSON Schema filter, validates the claim value against that schema.
|
|
16
|
+
* - Enforces `limit_disclosure` rules by returning only disclosures matching the specified fields
|
|
17
|
+
* if set to "required". Otherwise return the array of all disclosures.
|
|
18
|
+
* - Throws an error if a required field is invalid or missing.
|
|
19
|
+
*
|
|
20
|
+
* @param inputDescriptor - Describes constraints (fields, filters, etc.) that must be satisfied.
|
|
21
|
+
* @param payloadCredential - The credential payload to check against.
|
|
22
|
+
* @param disclosures - An array of DisclosureWithEncoded objects representing selective disclosures.
|
|
23
|
+
* @returns A filtered list of disclosures satisfying the descriptor constraints, or throws an error if not.
|
|
24
|
+
* @throws Will throw an error if any required constraint fails or if JSONPath lookups are invalid.
|
|
25
|
+
*/
|
|
26
|
+
export declare const evaluateInputDescriptorForSdJwt4VC: EvaluateInputDescriptorSdJwt4VC;
|
|
27
|
+
//# sourceMappingURL=07-evaluate-input-descriptor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"07-evaluate-input-descriptor.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/07-evaluate-input-descriptor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAC1C,OAAO,EAAE,QAAQ,EAAE,KAAK,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAO1E,MAAM,MAAM,oBAAoB,GAAG;IACjC,mBAAmB,EAAE,qBAAqB,EAAE,CAAC;IAC7C,mBAAmB,EAAE,qBAAqB,EAAE,CAAC;CAC9C,CAAC;AAEF,MAAM,MAAM,+BAA+B,GAAG,CAC5C,eAAe,EAAE,eAAe,EAChC,iBAAiB,EAAE,QAAQ,CAAC,SAAS,CAAC,EACtC,WAAW,EAAE,qBAAqB,EAAE,KACjC,oBAAoB,CAAC;AA4E1B;;;;;;;;;;;;;;;;;GAiBG;AACH,eAAO,MAAM,kCAAkC,EAAE,+BA4F9C,CAAC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import type { FetchJwks } from "./04-retrieve-rp-jwks";
|
|
2
|
+
import type { VerifyRequestObjectSignature } from "./05-verify-request-object";
|
|
3
|
+
import type { JWK } from "@pagopa/io-react-native-jwt/lib/typescript/types";
|
|
4
|
+
import { type Out } from "../../utils/misc";
|
|
5
|
+
import { PresentationDefinition, type Presentation } from "./types";
|
|
6
|
+
import * as z from "zod";
|
|
7
|
+
export type AuthorizationResponse = z.infer<typeof AuthorizationResponse>;
|
|
8
|
+
export declare const AuthorizationResponse: z.ZodObject<{
|
|
9
|
+
status: z.ZodOptional<z.ZodString>;
|
|
10
|
+
response_code: z.ZodOptional<z.ZodString>;
|
|
11
|
+
redirect_uri: z.ZodOptional<z.ZodString>;
|
|
12
|
+
}, "strip", z.ZodTypeAny, {
|
|
13
|
+
status?: string | undefined;
|
|
14
|
+
response_code?: string | undefined;
|
|
15
|
+
redirect_uri?: string | undefined;
|
|
16
|
+
}, {
|
|
17
|
+
status?: string | undefined;
|
|
18
|
+
response_code?: string | undefined;
|
|
19
|
+
redirect_uri?: string | undefined;
|
|
20
|
+
}>;
|
|
21
|
+
/**
|
|
22
|
+
* Selects an RSA public key (with `use = enc` and `kty = RSA`) from the set of JWK keys
|
|
23
|
+
* offered by the Relying Party (RP) for encryption.
|
|
24
|
+
*
|
|
25
|
+
* @param rpJwkKeys - The array of JWKs retrieved from the RP entity configuration.
|
|
26
|
+
* @returns The first suitable RSA public key found in the list.
|
|
27
|
+
* @throws {NoSuitableKeysFoundInEntityConfiguration} If no suitable RSA encryption key is found.
|
|
28
|
+
*/
|
|
29
|
+
export declare const chooseRSAPublicKeyToEncrypt: (rpJwkKeys: Out<FetchJwks>["keys"]) => JWK;
|
|
30
|
+
/**
|
|
31
|
+
* Prepares a Verified Presentation (VP) token to be sent as part of an
|
|
32
|
+
* authorization response in an OpenID 4 Verifiable Presentations flow.
|
|
33
|
+
*
|
|
34
|
+
* @param requestObject - The request object containing the nonce, response URI, and other necessary info.
|
|
35
|
+
* @param presentationTuple - A tuple containing a verifiable credential, the claims to disclose,
|
|
36
|
+
* and a cryptographic context for signing.
|
|
37
|
+
* @returns An object containing the signed VP token (`vp_token`) and a `presentation_submission` object.
|
|
38
|
+
* @param presentationDefinition - Definition outlining presentation requirements.
|
|
39
|
+
* @param presentationTuple - Tuple containing:
|
|
40
|
+
* - A verifiable credential.
|
|
41
|
+
* - Claims that should be disclosed.
|
|
42
|
+
* - Cryptographic context for signing.
|
|
43
|
+
* @returns An object with:
|
|
44
|
+
* - `vp_token`: The signed VP token.
|
|
45
|
+
* - `presentation_submission`: Object mapping disclosed credentials to the request.
|
|
46
|
+
*
|
|
47
|
+
* @remarks
|
|
48
|
+
* 1. The `disclose()` function is used to produce a token with only the requested claims.
|
|
49
|
+
* 2. A new JWT is then signed, including the VP, `jti`, `iss`, `nonce`, audience, and expiration.
|
|
50
|
+
* 3. The `presentation_submission` object follows the OpenID 4 VP specification for describing
|
|
51
|
+
* how the disclosed credentials map to the request.
|
|
52
|
+
*
|
|
53
|
+
* @todo [SIW-353] Support multiple verifiable credentials in a single request.
|
|
54
|
+
*/
|
|
55
|
+
export declare const prepareVpToken: (requestObject: Out<VerifyRequestObjectSignature>["requestObject"], presentationDefinition: PresentationDefinition, [verifiableCredential, requestedClaims, cryptoContext]: Presentation) => Promise<{
|
|
56
|
+
vp_token: string;
|
|
57
|
+
presentation_submission: Record<string, unknown>;
|
|
58
|
+
}>;
|
|
59
|
+
/**
|
|
60
|
+
* Builds a URL-encoded form body for a direct POST response without encryption.
|
|
61
|
+
*
|
|
62
|
+
* @param requestObject - Contains state, nonce, and other relevant info.
|
|
63
|
+
* @param vpToken - The signed VP token to include.
|
|
64
|
+
* @param presentationSubmission - Object mapping credential disclosures.
|
|
65
|
+
* @returns A URL-encoded string suitable for an `application/x-www-form-urlencoded` POST body.
|
|
66
|
+
*/
|
|
67
|
+
export declare const buildDirectPostBody: (requestObject: Out<VerifyRequestObjectSignature>["requestObject"], vpToken: string, presentationSubmission: Record<string, unknown>) => Promise<string>;
|
|
68
|
+
/**
|
|
69
|
+
* Builds a URL-encoded form body for a direct POST response using JWT encryption.
|
|
70
|
+
*
|
|
71
|
+
* @param jwkKeys - Array of JWKs from the Relying Party for encryption.
|
|
72
|
+
* @param requestObject - Contains state, nonce, and other relevant info.
|
|
73
|
+
* @param vpToken - The signed VP token to encrypt.
|
|
74
|
+
* @param presentationSubmission - Object mapping credential disclosures.
|
|
75
|
+
* @returns A URL-encoded string for an `application/x-www-form-urlencoded` POST body,
|
|
76
|
+
* where `response` contains the encrypted JWE.
|
|
77
|
+
*/
|
|
78
|
+
export declare const buildDirectPostJwtBody: (jwkKeys: Out<FetchJwks>["keys"], requestObject: Out<VerifyRequestObjectSignature>["requestObject"], vpToken: string, presentationSubmission: Record<string, unknown>) => Promise<string>;
|
|
79
|
+
/**
|
|
80
|
+
* Type definition for the function that sends the authorization response
|
|
81
|
+
* to the Relying Party, completing the presentation flow.
|
|
82
|
+
*/
|
|
83
|
+
export type SendAuthorizationResponse = (requestObject: Out<VerifyRequestObjectSignature>["requestObject"], presentationDefinition: PresentationDefinition, jwkKeys: Out<FetchJwks>["keys"], presentation: Presentation, // TODO: [SIW-353] support multiple presentations
|
|
84
|
+
context: {
|
|
85
|
+
appFetch?: GlobalFetch["fetch"];
|
|
86
|
+
}) => Promise<AuthorizationResponse>;
|
|
87
|
+
/**
|
|
88
|
+
* Sends the authorization response to the Relying Party (RP) using the specified `response_mode`.
|
|
89
|
+
* This function completes the presentation flow in an OpenID 4 Verifiable Presentations scenario.
|
|
90
|
+
*
|
|
91
|
+
* @param requestObject - The request details, including presentation requirements.
|
|
92
|
+
* @param presentationDefinition - The definition of the expected presentation.
|
|
93
|
+
* @param jwkKeys - Array of JWKs from the Relying Party for optional encryption.
|
|
94
|
+
* @param presentation - Tuple with verifiable credential, claims, and crypto context.
|
|
95
|
+
* @param context - Contains optional custom fetch implementation.
|
|
96
|
+
* @returns Parsed and validated authorization response from the Relying Party.
|
|
97
|
+
*/
|
|
98
|
+
export declare const sendAuthorizationResponse: SendAuthorizationResponse;
|
|
99
|
+
//# sourceMappingURL=08-send-authorization-response.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"08-send-authorization-response.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/08-send-authorization-response.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC;AAC/E,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kDAAkD,CAAC;AAE5E,OAAO,EAAoB,KAAK,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAE9D,OAAO,EAAE,sBAAsB,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AACpE,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAC1E,eAAO,MAAM,qBAAqB;;;;;;;;;;;;EAUhC,CAAC;AAEH;;;;;;;GAOG;AACH,eAAO,MAAM,2BAA2B,cAC3B,IAAI,SAAS,CAAC,CAAC,MAAM,CAAC,KAChC,GAaF,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,eAAO,MAAM,cAAc,kBACV,IAAI,4BAA4B,CAAC,CAAC,eAAe,CAAC,0BACzC,sBAAsB;cAGpC,MAAM;6BACS,OAAO,MAAM,EAAE,OAAO,CAAC;EAuCjD,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,kBACf,IAAI,4BAA4B,CAAC,CAAC,eAAe,CAAC,WACxD,MAAM,0BACS,OAAO,MAAM,EAAE,OAAO,CAAC,KAC9C,QAAQ,MAAM,CAQhB,CAAC;AAEF;;;;;;;;;GASG;AACH,eAAO,MAAM,sBAAsB,YACxB,IAAI,SAAS,CAAC,CAAC,MAAM,CAAC,iBAChB,IAAI,4BAA4B,CAAC,CAAC,eAAe,CAAC,WACxD,MAAM,0BACS,OAAO,MAAM,EAAE,OAAO,CAAC,KAC9C,QAAQ,MAAM,CAqBhB,CAAC;AAEF;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG,CACtC,aAAa,EAAE,GAAG,CAAC,4BAA4B,CAAC,CAAC,eAAe,CAAC,EACjE,sBAAsB,EAAE,sBAAsB,EAC9C,OAAO,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,EAC/B,YAAY,EAAE,YAAY,EAAE,iDAAiD;AAC7E,OAAO,EAAE;IACP,QAAQ,CAAC,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;CACjC,KACE,OAAO,CAAC,qBAAqB,CAAC,CAAC;AAEpC;;;;;;;;;;GAUG;AACH,eAAO,MAAM,yBAAyB,EAAE,yBAwCvC,CAAC"}
|
|
@@ -22,4 +22,37 @@ export declare class NoSuitableKeysFoundInEntityConfiguration extends IoWalletEr
|
|
|
22
22
|
*/
|
|
23
23
|
constructor(scenario: string);
|
|
24
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* When a QR code is not valid.
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
export declare class InvalidQRCodeError extends IoWalletError {
|
|
30
|
+
code: string;
|
|
31
|
+
/**
|
|
32
|
+
* @param detail A description of why the QR code is considered invalid.
|
|
33
|
+
*/
|
|
34
|
+
constructor(detail: string);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* When the entity is unverified because the Relying Party is not trusted.
|
|
38
|
+
*
|
|
39
|
+
*/
|
|
40
|
+
export declare class UnverifiedEntityError extends IoWalletError {
|
|
41
|
+
code: string;
|
|
42
|
+
/**
|
|
43
|
+
* @param reason A description of why the entity cannot be verified.
|
|
44
|
+
*/
|
|
45
|
+
constructor(reason: string);
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* When some required data is missing to continue because certain attributes are not contained inside the wallet.
|
|
49
|
+
*
|
|
50
|
+
*/
|
|
51
|
+
export declare class MissingDataError extends IoWalletError {
|
|
52
|
+
code: string;
|
|
53
|
+
/**
|
|
54
|
+
* @param missingAttributes An array or description of the attributes that are missing.
|
|
55
|
+
*/
|
|
56
|
+
constructor(missingAttributes: string);
|
|
57
|
+
}
|
|
25
58
|
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAkB,MAAM,oBAAoB,CAAC;AAEnE;;;GAGG;AACH,qBAAa,sBAAuB,SAAQ,aAAa;IACvD,IAAI,SAAwD;IAE5D,iDAAiD;IACjD,KAAK,EAAE,MAAM,CAAC;IAEd,8CAA8C;IAC9C,MAAM,EAAE,MAAM,CAAC;gBAGb,OAAO,EAAE,MAAM,EACf,KAAK,GAAE,MAAsB,EAC7B,MAAM,GAAE,MAAsB;CAMjC;AAED;;;GAGG;AACH,qBAAa,wCAAyC,SAAQ,aAAa;IACzE,IAAI,SAAoC;IAExC;;OAEG;gBACS,QAAQ,EAAE,MAAM;CAI7B"}
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../src/credential/presentation/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAkB,MAAM,oBAAoB,C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