@pagopa/io-react-native-wallet 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/commonjs/credential/index.js +1 -5
- package/lib/commonjs/credential/index.js.map +1 -1
- package/lib/commonjs/credential/issuance/02-get-issuer-config.js +48 -0
- package/lib/commonjs/credential/issuance/02-get-issuer-config.js.map +1 -0
- package/lib/commonjs/credential/issuance/03-start-user-authorization.js +16 -20
- package/lib/commonjs/credential/issuance/03-start-user-authorization.js.map +1 -1
- package/lib/commonjs/credential/issuance/04-complete-user-authorization.js +8 -8
- package/lib/commonjs/credential/issuance/04-complete-user-authorization.js.map +1 -1
- package/lib/commonjs/credential/issuance/05-authorize-access.js +8 -9
- package/lib/commonjs/credential/issuance/05-authorize-access.js.map +1 -1
- package/lib/commonjs/credential/issuance/06-obtain-credential.js +18 -21
- package/lib/commonjs/credential/issuance/06-obtain-credential.js.map +1 -1
- package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js +3 -3
- package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js.map +1 -1
- package/lib/commonjs/credential/issuance/README.md +18 -21
- package/lib/commonjs/credential/issuance/index.js +3 -3
- package/lib/commonjs/credential/issuance/index.js.map +1 -1
- package/lib/commonjs/credential/issuance/types.js +1 -1
- package/lib/commonjs/credential/issuance/types.js.map +1 -1
- package/lib/commonjs/credential/presentation/01-start-flow.js +7 -2
- package/lib/commonjs/credential/presentation/01-start-flow.js.map +1 -1
- package/lib/commonjs/credential/presentation/02-evaluate-rp-trust.js +2 -2
- package/lib/commonjs/credential/presentation/02-evaluate-rp-trust.js.map +1 -1
- package/lib/commonjs/credential/presentation/03-retrieve-jwks.js +68 -0
- package/lib/commonjs/credential/presentation/03-retrieve-jwks.js.map +1 -0
- package/lib/commonjs/credential/presentation/{03-get-request-object.js → 04-get-request-object.js} +27 -13
- package/lib/commonjs/credential/presentation/04-get-request-object.js.map +1 -0
- package/lib/commonjs/credential/presentation/{04-send-authorization-response.js → 05-send-authorization-response.js} +1 -1
- package/lib/commonjs/credential/presentation/{04-send-authorization-response.js.map → 05-send-authorization-response.js.map} +1 -1
- package/lib/commonjs/credential/presentation/README.md +74 -2
- package/lib/commonjs/credential/presentation/index.js +15 -2
- package/lib/commonjs/credential/presentation/index.js.map +1 -1
- package/lib/commonjs/credential/presentation/types.js +5 -3
- package/lib/commonjs/credential/presentation/types.js.map +1 -1
- package/lib/commonjs/entity/openid-connect/issuer/index.js +25 -0
- package/lib/commonjs/entity/openid-connect/issuer/index.js.map +1 -0
- package/lib/commonjs/entity/openid-connect/issuer/types.js +61 -0
- package/lib/commonjs/entity/openid-connect/issuer/types.js.map +1 -0
- package/lib/commonjs/{trust → entity/trust}/chain.js +1 -1
- package/lib/commonjs/entity/trust/chain.js.map +1 -0
- package/lib/commonjs/{trust → entity/trust}/index.js +1 -1
- package/lib/commonjs/entity/trust/index.js.map +1 -0
- package/lib/commonjs/{trust → entity/trust}/types.js +2 -2
- package/lib/commonjs/entity/trust/types.js.map +1 -0
- package/lib/commonjs/index.js +1 -3
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/pid/sd-jwt/types.js +2 -18
- package/lib/commonjs/pid/sd-jwt/types.js.map +1 -1
- package/lib/commonjs/sd-jwt/__test__/index.test.js +32 -23
- package/lib/commonjs/sd-jwt/__test__/index.test.js.map +1 -1
- package/lib/commonjs/sd-jwt/__test__/types.test.js +20 -11
- package/lib/commonjs/sd-jwt/__test__/types.test.js.map +1 -1
- package/lib/commonjs/sd-jwt/types.js +18 -5
- package/lib/commonjs/sd-jwt/types.js.map +1 -1
- package/lib/commonjs/utils/error-codes.js +1 -13
- package/lib/commonjs/utils/error-codes.js.map +1 -1
- package/lib/commonjs/utils/errors.js +2 -53
- package/lib/commonjs/utils/errors.js.map +1 -1
- package/lib/commonjs/utils/jwk.js +5 -1
- package/lib/commonjs/utils/jwk.js.map +1 -1
- package/lib/commonjs/utils/par.js +6 -12
- package/lib/commonjs/utils/par.js.map +1 -1
- package/lib/module/credential/index.js +1 -3
- package/lib/module/credential/index.js.map +1 -1
- package/lib/module/credential/issuance/02-get-issuer-config.js +42 -0
- package/lib/module/credential/issuance/02-get-issuer-config.js.map +1 -0
- package/lib/module/credential/issuance/03-start-user-authorization.js +16 -20
- package/lib/module/credential/issuance/03-start-user-authorization.js.map +1 -1
- package/lib/module/credential/issuance/04-complete-user-authorization.js +8 -8
- package/lib/module/credential/issuance/04-complete-user-authorization.js.map +1 -1
- package/lib/module/credential/issuance/05-authorize-access.js +8 -9
- package/lib/module/credential/issuance/05-authorize-access.js.map +1 -1
- package/lib/module/credential/issuance/06-obtain-credential.js +18 -21
- package/lib/module/credential/issuance/06-obtain-credential.js.map +1 -1
- package/lib/module/credential/issuance/07-verify-and-parse-credential.js +3 -3
- package/lib/module/credential/issuance/07-verify-and-parse-credential.js.map +1 -1
- package/lib/module/credential/issuance/README.md +18 -21
- package/lib/module/credential/issuance/index.js +2 -2
- package/lib/module/credential/issuance/index.js.map +1 -1
- package/lib/module/credential/issuance/types.js +1 -1
- package/lib/module/credential/issuance/types.js.map +1 -1
- package/lib/module/credential/presentation/01-start-flow.js +7 -2
- package/lib/module/credential/presentation/01-start-flow.js.map +1 -1
- package/lib/module/credential/presentation/02-evaluate-rp-trust.js +1 -1
- package/lib/module/credential/presentation/02-evaluate-rp-trust.js.map +1 -1
- package/lib/module/credential/presentation/03-retrieve-jwks.js +61 -0
- package/lib/module/credential/presentation/03-retrieve-jwks.js.map +1 -0
- package/lib/module/credential/presentation/{03-get-request-object.js → 04-get-request-object.js} +26 -12
- package/lib/module/credential/presentation/04-get-request-object.js.map +1 -0
- package/lib/module/credential/presentation/{04-send-authorization-response.js → 05-send-authorization-response.js} +1 -1
- package/lib/module/credential/presentation/{04-send-authorization-response.js.map → 05-send-authorization-response.js.map} +1 -1
- package/lib/module/credential/presentation/README.md +74 -2
- package/lib/module/credential/presentation/index.js +4 -3
- package/lib/module/credential/presentation/index.js.map +1 -1
- package/lib/module/credential/presentation/types.js +5 -3
- package/lib/module/credential/presentation/types.js.map +1 -1
- package/lib/module/entity/openid-connect/issuer/index.js +20 -0
- package/lib/module/entity/openid-connect/issuer/index.js.map +1 -0
- package/lib/module/entity/openid-connect/issuer/types.js +47 -0
- package/lib/module/entity/openid-connect/issuer/types.js.map +1 -0
- package/lib/module/{trust → entity/trust}/chain.js +1 -1
- package/lib/module/entity/trust/chain.js.map +1 -0
- package/lib/module/{trust → entity/trust}/index.js +1 -1
- package/lib/module/entity/trust/index.js.map +1 -0
- package/lib/module/{trust → entity/trust}/types.js +2 -2
- package/lib/module/entity/trust/types.js.map +1 -0
- package/lib/module/index.js +1 -2
- package/lib/module/index.js.map +1 -1
- package/lib/module/pid/sd-jwt/types.js +1 -16
- package/lib/module/pid/sd-jwt/types.js.map +1 -1
- package/lib/module/sd-jwt/__test__/index.test.js +32 -23
- package/lib/module/sd-jwt/__test__/index.test.js.map +1 -1
- package/lib/module/sd-jwt/__test__/types.test.js +20 -11
- package/lib/module/sd-jwt/__test__/types.test.js.map +1 -1
- package/lib/module/sd-jwt/types.js +16 -4
- package/lib/module/sd-jwt/types.js.map +1 -1
- package/lib/module/utils/error-codes.js +1 -13
- package/lib/module/utils/error-codes.js.map +1 -1
- package/lib/module/utils/errors.js +0 -48
- package/lib/module/utils/errors.js.map +1 -1
- package/lib/module/utils/jwk.js +3 -0
- package/lib/module/utils/jwk.js.map +1 -1
- package/lib/module/utils/par.js +6 -12
- package/lib/module/utils/par.js.map +1 -1
- package/lib/typescript/credential/index.d.ts +1 -3
- package/lib/typescript/credential/index.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/01-start-flow.d.ts +1 -1
- package/lib/typescript/credential/issuance/02-get-issuer-config.d.ts +32 -0
- package/lib/typescript/credential/issuance/02-get-issuer-config.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/03-start-user-authorization.d.ts +3 -3
- package/lib/typescript/credential/issuance/03-start-user-authorization.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts +8 -8
- package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/05-authorize-access.d.ts +3 -3
- package/lib/typescript/credential/issuance/05-authorize-access.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/06-obtain-credential.d.ts +3 -3
- package/lib/typescript/credential/issuance/06-obtain-credential.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/07-verify-and-parse-credential.d.ts +3 -3
- package/lib/typescript/credential/issuance/07-verify-and-parse-credential.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/index.d.ts +3 -3
- package/lib/typescript/credential/issuance/index.d.ts.map +1 -1
- package/lib/typescript/credential/issuance/types.d.ts +4 -9
- package/lib/typescript/credential/issuance/types.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/01-start-flow.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/02-evaluate-rp-trust.d.ts +1 -1
- package/lib/typescript/credential/presentation/02-evaluate-rp-trust.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/03-retrieve-jwks.d.ts +41 -0
- package/lib/typescript/credential/presentation/03-retrieve-jwks.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/{03-get-request-object.d.ts → 04-get-request-object.d.ts} +4 -4
- package/lib/typescript/credential/presentation/04-get-request-object.d.ts.map +1 -0
- package/lib/typescript/credential/presentation/{04-send-authorization-response.d.ts → 05-send-authorization-response.d.ts} +2 -2
- package/lib/typescript/credential/presentation/{04-send-authorization-response.d.ts.map → 05-send-authorization-response.d.ts.map} +1 -1
- package/lib/typescript/credential/presentation/index.d.ts +5 -4
- package/lib/typescript/credential/presentation/index.d.ts.map +1 -1
- package/lib/typescript/credential/presentation/types.d.ts +15 -15
- package/lib/typescript/entity/openid-connect/issuer/index.d.ts +12 -0
- package/lib/typescript/entity/openid-connect/issuer/index.d.ts.map +1 -0
- package/lib/typescript/entity/openid-connect/issuer/types.d.ts +641 -0
- package/lib/typescript/entity/openid-connect/issuer/types.d.ts.map +1 -0
- package/lib/typescript/entity/trust/chain.d.ts.map +1 -0
- package/lib/typescript/{trust → entity/trust}/index.d.ts +97 -97
- package/lib/typescript/entity/trust/index.d.ts.map +1 -0
- package/lib/typescript/{trust → entity/trust}/types.d.ts +597 -597
- package/lib/typescript/{trust → entity/trust}/types.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +1 -2
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/pid/sd-jwt/types.d.ts +25 -103
- package/lib/typescript/pid/sd-jwt/types.d.ts.map +1 -1
- package/lib/typescript/sd-jwt/index.d.ts +60 -20
- package/lib/typescript/sd-jwt/index.d.ts.map +1 -1
- package/lib/typescript/sd-jwt/types.d.ts +114 -24
- package/lib/typescript/sd-jwt/types.d.ts.map +1 -1
- package/lib/typescript/utils/error-codes.d.ts +0 -12
- package/lib/typescript/utils/error-codes.d.ts.map +1 -1
- package/lib/typescript/utils/errors.d.ts +6 -37
- package/lib/typescript/utils/errors.d.ts.map +1 -1
- package/lib/typescript/utils/jwk.d.ts +135 -0
- package/lib/typescript/utils/jwk.d.ts.map +1 -1
- package/lib/typescript/utils/par.d.ts +1 -8
- package/lib/typescript/utils/par.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/types.d.ts +12 -12
- package/package.json +1 -1
- package/src/credential/index.ts +1 -4
- package/src/credential/issuance/01-start-flow.ts +1 -1
- package/src/credential/issuance/02-get-issuer-config.ts +67 -0
- package/src/credential/issuance/03-start-user-authorization.ts +22 -30
- package/src/credential/issuance/04-complete-user-authorization.ts +11 -13
- package/src/credential/issuance/05-authorize-access.ts +8 -10
- package/src/credential/issuance/06-obtain-credential.ts +30 -31
- package/src/credential/issuance/07-verify-and-parse-credential.ts +6 -6
- package/src/credential/issuance/README.md +18 -21
- package/src/credential/issuance/index.ts +3 -6
- package/src/credential/issuance/types.ts +1 -1
- package/src/credential/presentation/01-start-flow.ts +8 -2
- package/src/credential/presentation/02-evaluate-rp-trust.ts +2 -2
- package/src/credential/presentation/03-retrieve-jwks.ts +73 -0
- package/src/credential/presentation/{03-get-request-object.ts → 04-get-request-object.ts} +33 -15
- package/src/credential/presentation/{04-send-authorization-response.ts → 05-send-authorization-response.ts} +1 -1
- package/src/credential/presentation/README.md +74 -2
- package/src/credential/presentation/index.ts +10 -2
- package/src/credential/presentation/types.ts +3 -3
- package/src/entity/openid-connect/issuer/index.ts +27 -0
- package/src/entity/openid-connect/issuer/types.ts +68 -0
- package/src/{trust → entity/trust}/chain.ts +2 -2
- package/src/{trust → entity/trust}/index.ts +1 -1
- package/src/{trust → entity/trust}/types.ts +2 -2
- package/src/index.ts +0 -2
- package/src/pid/sd-jwt/types.ts +1 -18
- package/src/sd-jwt/__test__/index.test.ts +47 -37
- package/src/sd-jwt/__test__/types.test.ts +26 -16
- package/src/sd-jwt/types.ts +16 -2
- package/src/utils/error-codes.ts +0 -12
- package/src/utils/errors.ts +12 -86
- package/src/utils/jwk.ts +5 -0
- package/src/utils/par.ts +3 -10
- package/lib/commonjs/credential/issuance/02-evaluate-issuer-trust.js +0 -27
- package/lib/commonjs/credential/issuance/02-evaluate-issuer-trust.js.map +0 -1
- package/lib/commonjs/credential/presentation/03-get-request-object.js.map +0 -1
- package/lib/commonjs/credential/status/01-start-flow.js +0 -2
- package/lib/commonjs/credential/status/01-start-flow.js.map +0 -1
- package/lib/commonjs/credential/status/02-status-attestation.js +0 -72
- package/lib/commonjs/credential/status/02-status-attestation.js.map +0 -1
- package/lib/commonjs/credential/status/03-verify-and-parse-status-attestation.js +0 -52
- package/lib/commonjs/credential/status/03-verify-and-parse-status-attestation.js.map +0 -1
- package/lib/commonjs/credential/status/README.md +0 -67
- package/lib/commonjs/credential/status/index.js +0 -27
- package/lib/commonjs/credential/status/index.js.map +0 -1
- package/lib/commonjs/credential/status/types.js +0 -48
- package/lib/commonjs/credential/status/types.js.map +0 -1
- package/lib/commonjs/credential/trustmark/README.md +0 -62
- package/lib/commonjs/credential/trustmark/get-credential-trustmark.js +0 -81
- package/lib/commonjs/credential/trustmark/get-credential-trustmark.js.map +0 -1
- package/lib/commonjs/credential/trustmark/index.js +0 -13
- package/lib/commonjs/credential/trustmark/index.js.map +0 -1
- package/lib/commonjs/trust/chain.js.map +0 -1
- package/lib/commonjs/trust/index.js.map +0 -1
- package/lib/commonjs/trust/types.js.map +0 -1
- package/lib/module/credential/issuance/02-evaluate-issuer-trust.js +0 -20
- package/lib/module/credential/issuance/02-evaluate-issuer-trust.js.map +0 -1
- package/lib/module/credential/presentation/03-get-request-object.js.map +0 -1
- package/lib/module/credential/status/01-start-flow.js +0 -2
- package/lib/module/credential/status/01-start-flow.js.map +0 -1
- package/lib/module/credential/status/02-status-attestation.js +0 -64
- package/lib/module/credential/status/02-status-attestation.js.map +0 -1
- package/lib/module/credential/status/03-verify-and-parse-status-attestation.js +0 -46
- package/lib/module/credential/status/03-verify-and-parse-status-attestation.js.map +0 -1
- package/lib/module/credential/status/README.md +0 -67
- package/lib/module/credential/status/index.js +0 -5
- package/lib/module/credential/status/index.js.map +0 -1
- package/lib/module/credential/status/types.js +0 -40
- package/lib/module/credential/status/types.js.map +0 -1
- package/lib/module/credential/trustmark/README.md +0 -62
- package/lib/module/credential/trustmark/get-credential-trustmark.js +0 -72
- package/lib/module/credential/trustmark/get-credential-trustmark.js.map +0 -1
- package/lib/module/credential/trustmark/index.js +0 -3
- package/lib/module/credential/trustmark/index.js.map +0 -1
- package/lib/module/trust/chain.js.map +0 -1
- package/lib/module/trust/index.js.map +0 -1
- package/lib/module/trust/types.js.map +0 -1
- package/lib/typescript/credential/issuance/02-evaluate-issuer-trust.d.ts +0 -19
- package/lib/typescript/credential/issuance/02-evaluate-issuer-trust.d.ts.map +0 -1
- package/lib/typescript/credential/presentation/03-get-request-object.d.ts.map +0 -1
- package/lib/typescript/credential/status/01-start-flow.d.ts +0 -10
- package/lib/typescript/credential/status/01-start-flow.d.ts.map +0 -1
- package/lib/typescript/credential/status/02-status-attestation.d.ts +0 -19
- package/lib/typescript/credential/status/02-status-attestation.d.ts.map +0 -1
- package/lib/typescript/credential/status/03-verify-and-parse-status-attestation.d.ts +0 -24
- package/lib/typescript/credential/status/03-verify-and-parse-status-attestation.d.ts.map +0 -1
- package/lib/typescript/credential/status/index.d.ts +0 -7
- package/lib/typescript/credential/status/index.d.ts.map +0 -1
- package/lib/typescript/credential/status/types.d.ts +0 -305
- package/lib/typescript/credential/status/types.d.ts.map +0 -1
- package/lib/typescript/credential/trustmark/get-credential-trustmark.d.ts +0 -52
- package/lib/typescript/credential/trustmark/get-credential-trustmark.d.ts.map +0 -1
- package/lib/typescript/credential/trustmark/index.d.ts +0 -4
- package/lib/typescript/credential/trustmark/index.d.ts.map +0 -1
- package/lib/typescript/trust/chain.d.ts.map +0 -1
- package/lib/typescript/trust/index.d.ts.map +0 -1
- package/src/credential/issuance/02-evaluate-issuer-trust.ts +0 -32
- package/src/credential/status/01-start-flow.ts +0 -9
- package/src/credential/status/02-status-attestation.ts +0 -102
- package/src/credential/status/03-verify-and-parse-status-attestation.ts +0 -60
- package/src/credential/status/README.md +0 -67
- package/src/credential/status/index.ts +0 -22
- package/src/credential/status/types.ts +0 -43
- package/src/credential/trustmark/README.md +0 -62
- package/src/credential/trustmark/get-credential-trustmark.ts +0 -120
- package/src/credential/trustmark/index.ts +0 -8
- /package/lib/typescript/{trust → entity/trust}/chain.d.ts +0 -0
@@ -3,15 +3,11 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.Presentation = exports.Issuance = void 0;
|
7
7
|
var Issuance = _interopRequireWildcard(require("./issuance"));
|
8
8
|
exports.Issuance = Issuance;
|
9
9
|
var Presentation = _interopRequireWildcard(require("./presentation"));
|
10
10
|
exports.Presentation = Presentation;
|
11
|
-
var Status = _interopRequireWildcard(require("./status"));
|
12
|
-
exports.Status = Status;
|
13
|
-
var Trustmark = _interopRequireWildcard(require("./trustmark"));
|
14
|
-
exports.Trustmark = Trustmark;
|
15
11
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
16
12
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
17
13
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["Issuance","_interopRequireWildcard","require","exports","Presentation","
|
1
|
+
{"version":3,"names":["Issuance","_interopRequireWildcard","require","exports","Presentation","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set"],"sourceRoot":"../../../src","sources":["credential/index.ts"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAuCC,OAAA,CAAAH,QAAA,GAAAA,QAAA;AACvC,IAAAI,YAAA,GAAAH,uBAAA,CAAAC,OAAA;AAA+CC,OAAA,CAAAC,YAAA,GAAAA,YAAA;AAAA,SAAAC,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAL,wBAAAS,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAAA,CAAAC,cAAA,CAAAH,MAAA,EAAAK,GAAA,EAAAI,IAAA,YAAAT,MAAA,CAAAK,GAAA,IAAAX,GAAA,CAAAW,GAAA,SAAAL,MAAA,CAAAJ,OAAA,GAAAF,GAAA,MAAAG,KAAA,IAAAA,KAAA,CAAAa,GAAA,CAAAhB,GAAA,EAAAM,MAAA,YAAAA,MAAA"}
|
@@ -0,0 +1,48 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.getIssuerConfig = void 0;
|
7
|
+
var _issuer = require("../../entity/openid-connect/issuer");
|
8
|
+
/**
|
9
|
+
* Common configuration for the issuer.
|
10
|
+
* This is needed to have a common configuration for the issuer to be used in our flows.
|
11
|
+
* It allows to support multiple issuers with different configurations, defining a common interface to interact with them.
|
12
|
+
*/
|
13
|
+
|
14
|
+
/**
|
15
|
+
* WARNING: This function must be called after {@link startFlow}. The next function to be called is {@link startUserAuthorization}.
|
16
|
+
* Get the Issuer's configuration from the Issuer's metadata.
|
17
|
+
* Currently it only supports a mixed configuration based on OpenID Connect partial implementation.
|
18
|
+
* @param issuerUrl The base url of the Issuer returned by {@link startFlow}
|
19
|
+
* @param context.appFetch (optional) fetch api implementation. Default: built-in fetch
|
20
|
+
* @returns The Issuer's configuration
|
21
|
+
*/
|
22
|
+
const getIssuerConfig = async function (issuerUrl) {
|
23
|
+
let context = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
24
|
+
const res = await (0, _issuer.getCredentialIssuerMetadata)(issuerUrl, {
|
25
|
+
appFetch: context.appFetch
|
26
|
+
});
|
27
|
+
return credentialIssuerRationalization(res);
|
28
|
+
};
|
29
|
+
|
30
|
+
/**
|
31
|
+
* Rationalize the issuer's metadata to the issuer's configuration which is then used in our flows to interact with the issuer.
|
32
|
+
* @param issuerMetadata - The issuer's metadata
|
33
|
+
* @returns the isssuer configuration to be used later in our flows
|
34
|
+
*/
|
35
|
+
exports.getIssuerConfig = getIssuerConfig;
|
36
|
+
const credentialIssuerRationalization = issuerMetadata => {
|
37
|
+
return {
|
38
|
+
issuerConf: {
|
39
|
+
credential_configurations_supported: issuerMetadata.credential_configurations_supported,
|
40
|
+
pushed_authorization_request_endpoint: issuerMetadata.pushed_authorization_request_endpoint,
|
41
|
+
authorization_endpoint: issuerMetadata.authorization_endpoint,
|
42
|
+
token_endpoint: issuerMetadata.token_endpoint,
|
43
|
+
credential_endpoint: issuerMetadata.credential_endpoint,
|
44
|
+
keys: issuerMetadata.jwks.keys
|
45
|
+
}
|
46
|
+
};
|
47
|
+
};
|
48
|
+
//# sourceMappingURL=02-get-issuer-config.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["_issuer","require","getIssuerConfig","issuerUrl","context","arguments","length","undefined","res","getCredentialIssuerMetadata","appFetch","credentialIssuerRationalization","exports","issuerMetadata","issuerConf","credential_configurations_supported","pushed_authorization_request_endpoint","authorization_endpoint","token_endpoint","credential_endpoint","keys","jwks"],"sourceRoot":"../../../../src","sources":["credential/issuance/02-get-issuer-config.ts"],"mappings":";;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AAUA;AACA;AACA;AACA;AACA;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,eAAgC,GAAG,eAAAA,CAC9CC,SAAS,EAEuB;EAAA,IADhCC,OAAO,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAEZ,MAAMG,GAAG,GAAG,MAAM,IAAAC,mCAA2B,EAACN,SAAS,EAAE;IACvDO,QAAQ,EAAEN,OAAO,CAACM;EACpB,CAAC,CAAC;EAEF,OAAOC,+BAA+B,CAACH,GAAG,CAAC;AAC7C,CAAC;;AAED;AACA;AACA;AACA;AACA;AAJAI,OAAA,CAAAV,eAAA,GAAAA,eAAA;AAKA,MAAMS,+BAA+B,GACnCE,cAAuE,IAC9B;EACzC,OAAO;IACLC,UAAU,EAAE;MACVC,mCAAmC,EACjCF,cAAc,CAACE,mCAAmC;MACpDC,qCAAqC,EACnCH,cAAc,CAACG,qCAAqC;MACtDC,sBAAsB,EAAEJ,cAAc,CAACI,sBAAsB;MAC7DC,cAAc,EAAEL,cAAc,CAACK,cAAc;MAC7CC,mBAAmB,EAAEN,cAAc,CAACM,mBAAmB;MACvDC,IAAI,EAAEP,cAAc,CAACQ,IAAI,CAACD;IAC5B;EACF,CAAC;AACH,CAAC"}
|
@@ -6,11 +6,10 @@ Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
exports.startUserAuthorization = void 0;
|
7
7
|
var _misc = require("../../utils/misc");
|
8
8
|
var _par = require("../../utils/par");
|
9
|
-
var _const = require("./const");
|
10
9
|
/**
|
11
10
|
* Ensures that the credential type requested is supported by the issuer and contained in the
|
12
11
|
* issuer configuration.
|
13
|
-
* @param issuerConf The issuer configuration returned by {@link
|
12
|
+
* @param issuerConf The issuer configuration returned by {@link getIssuerConfig}
|
14
13
|
* @param credentialType The type of the credential to be requested returned by {@link startFlow}
|
15
14
|
* @param context.wiaCryptoContext The Wallet Instance's crypto context
|
16
15
|
* @param context.walletInstanceAttestation The Wallet Instance's attestation
|
@@ -19,15 +18,16 @@ var _const = require("./const");
|
|
19
18
|
* @returns The credential definition to be used in the request which includes the format and the type and its type
|
20
19
|
*/
|
21
20
|
const selectCredentialDefinition = (issuerConf, credentialType) => {
|
22
|
-
const credential_configurations_supported = issuerConf.
|
23
|
-
const
|
24
|
-
|
25
|
-
format: credential_configurations_supported[e].format,
|
26
|
-
type: "openid_credential"
|
27
|
-
}));
|
28
|
-
if (!result) {
|
21
|
+
const credential_configurations_supported = issuerConf.credential_configurations_supported;
|
22
|
+
const credential = credential_configurations_supported[credentialType];
|
23
|
+
if (!credential) {
|
29
24
|
throw new Error(`No credential support the type '${credentialType}'`);
|
30
25
|
}
|
26
|
+
const result = {
|
27
|
+
credential_configuration_id: credentialType,
|
28
|
+
format: credential.format,
|
29
|
+
type: "openid_credential"
|
30
|
+
};
|
31
31
|
return result;
|
32
32
|
};
|
33
33
|
|
@@ -35,19 +35,15 @@ const selectCredentialDefinition = (issuerConf, credentialType) => {
|
|
35
35
|
* Ensures that the response mode requested is supported by the issuer and contained in the issuer configuration.
|
36
36
|
* @param issuerConf The issuer configuration
|
37
37
|
* @param credentialType The type of the credential to be requested
|
38
|
-
* @returns The response mode to be used in the request, "query" for
|
38
|
+
* @returns The response mode to be used in the request, "query" for urn:eu.europa.ec.eudi:pid:1 and "form_post.jwt" for all other types.
|
39
39
|
*/
|
40
|
-
const selectResponseMode =
|
41
|
-
const
|
42
|
-
const responseMode = credentialType === "PersonIdentificationData" ? "query" : "form_post.jwt";
|
43
|
-
if (!responseModeSupported.includes(responseMode)) {
|
44
|
-
throw new Error(`No response mode support the type '${credentialType}'`);
|
45
|
-
}
|
40
|
+
const selectResponseMode = credentialType => {
|
41
|
+
const responseMode = credentialType === "urn:eu.europa.ec.eudi:pid:1" ? "query" : "form_post.jwt";
|
46
42
|
return responseMode;
|
47
43
|
};
|
48
44
|
|
49
45
|
/**
|
50
|
-
* WARNING: This function must be called after {@link
|
46
|
+
* WARNING: This function must be called after {@link getIssuerConfig} and {@link startFlow}. The next steam is {@link compeUserAuthorizationWithQueryMode} or {@link compeUserAuthorizationWithFormPostJwtMode}
|
51
47
|
* Creates and sends a PAR request to the /as/par endpoint of the authorization server.
|
52
48
|
* This starts the authentication flow to obtain an access token.
|
53
49
|
* This token enables the Wallet Instance to request a digital credential from the Credential Endpoint of the Credential Issuer.
|
@@ -73,14 +69,14 @@ const startUserAuthorization = async (issuerConf, credentialType, ctx) => {
|
|
73
69
|
} = ctx;
|
74
70
|
const clientId = await wiaCryptoContext.getPublicKey().then(_ => _.kid);
|
75
71
|
const codeVerifier = (0, _misc.generateRandomAlphaNumericString)(64);
|
76
|
-
const parEndpoint = issuerConf.
|
72
|
+
const parEndpoint = issuerConf.pushed_authorization_request_endpoint;
|
77
73
|
const credentialDefinition = selectCredentialDefinition(issuerConf, credentialType);
|
78
|
-
const responseMode = selectResponseMode(
|
74
|
+
const responseMode = selectResponseMode(credentialType);
|
79
75
|
const getPar = (0, _par.makeParRequest)({
|
80
76
|
wiaCryptoContext,
|
81
77
|
appFetch
|
82
78
|
});
|
83
|
-
const issuerRequestUri = await getPar(clientId, codeVerifier, redirectUri, responseMode, parEndpoint, walletInstanceAttestation, [credentialDefinition]
|
79
|
+
const issuerRequestUri = await getPar(clientId, codeVerifier, redirectUri, responseMode, parEndpoint, walletInstanceAttestation, [credentialDefinition]);
|
84
80
|
return {
|
85
81
|
issuerRequestUri,
|
86
82
|
clientId,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_misc","require","_par","
|
1
|
+
{"version":3,"names":["_misc","require","_par","selectCredentialDefinition","issuerConf","credentialType","credential_configurations_supported","credential","Error","result","credential_configuration_id","format","type","selectResponseMode","responseMode","startUserAuthorization","ctx","wiaCryptoContext","walletInstanceAttestation","redirectUri","appFetch","fetch","clientId","getPublicKey","then","_","kid","codeVerifier","generateRandomAlphaNumericString","parEndpoint","pushed_authorization_request_endpoint","credentialDefinition","getPar","makeParRequest","issuerRequestUri","exports"],"sourceRoot":"../../../../src","sources":["credential/issuance/03-start-user-authorization.ts"],"mappings":";;;;;;AAEA,IAAAA,KAAA,GAAAC,OAAA;AAEA,IAAAC,IAAA,GAAAD,OAAA;AAmBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAME,0BAA0B,GAAGA,CACjCC,UAA8C,EAC9CC,cAAgD,KACxB;EACxB,MAAMC,mCAAmC,GACvCF,UAAU,CAACE,mCAAmC;EAEhD,MAAMC,UAAU,GAAGD,mCAAmC,CAACD,cAAc,CAAC;EAEtE,IAAI,CAACE,UAAU,EAAE;IACf,MAAM,IAAIC,KAAK,CAAE,mCAAkCH,cAAe,GAAE,CAAC;EACvE;EAEA,MAAMI,MAAM,GAAG;IACbC,2BAA2B,EAAEL,cAAc;IAC3CM,MAAM,EAAEJ,UAAU,CAACI,MAAM;IACzBC,IAAI,EAAE;EACR,CAAC;EAED,OAAOH,MAAM;AACf,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,MAAMI,kBAAkB,GACtBR,cAAgD,IAC/B;EACjB,MAAMS,YAAY,GAChBT,cAAc,KAAK,6BAA6B,GAC5C,OAAO,GACP,eAAe;EAErB,OAAOS,YAAY;AACrB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,sBAA8C,GAAG,MAAAA,CAC5DX,UAAU,EACVC,cAAc,EACdW,GAAG,KACA;EACH,MAAM;IACJC,gBAAgB;IAChBC,yBAAyB;IACzBC,WAAW;IACXC,QAAQ,GAAGC;EACb,CAAC,GAAGL,GAAG;EAEP,MAAMM,QAAQ,GAAG,MAAML,gBAAgB,CAACM,YAAY,CAAC,CAAC,CAACC,IAAI,CAAEC,CAAC,IAAKA,CAAC,CAACC,GAAG,CAAC;EACzE,MAAMC,YAAY,GAAG,IAAAC,sCAAgC,EAAC,EAAE,CAAC;EACzD,MAAMC,WAAW,GAAGzB,UAAU,CAAC0B,qCAAqC;EACpE,MAAMC,oBAAoB,GAAG5B,0BAA0B,CACrDC,UAAU,EACVC,cACF,CAAC;EACD,MAAMS,YAAY,GAAGD,kBAAkB,CAACR,cAAc,CAAC;EAEvD,MAAM2B,MAAM,GAAG,IAAAC,mBAAc,EAAC;IAAEhB,gBAAgB;IAAEG;EAAS,CAAC,CAAC;EAC7D,MAAMc,gBAAgB,GAAG,MAAMF,MAAM,CACnCV,QAAQ,EACRK,YAAY,EACZR,WAAW,EACXL,YAAY,EACZe,WAAW,EACXX,yBAAyB,EACzB,CAACa,oBAAoB,CACvB,CAAC;EAED,OAAO;IAAEG,gBAAgB;IAAEZ,QAAQ;IAAEK,YAAY;IAAEI;EAAqB,CAAC;AAC3E,CAAC;AAACI,OAAA,CAAApB,sBAAA,GAAAA,sBAAA"}
|
@@ -16,7 +16,7 @@ var _decoder = require("../../utils/decoder");
|
|
16
16
|
var _errors2 = require("./errors");
|
17
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
18
18
|
/**
|
19
|
-
* The interface of the phase to complete User authorization via strong identification when the response mode is "query" and the request credential is a
|
19
|
+
* The interface of the phase to complete User authorization via strong identification when the response mode is "query" and the request credential is a urn:eu.europa.ec.eudi:pid:1.
|
20
20
|
*/
|
21
21
|
|
22
22
|
/**
|
@@ -24,12 +24,12 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
24
24
|
* Builds the authorization URL to which the end user should be redirected to continue the authentication flow.
|
25
25
|
* @param issuerRequestUri the URI of the issuer where the request is sent
|
26
26
|
* @param clientId Identifies the current client across all the requests of the issuing flow returned by {@link startUserAuthorization}
|
27
|
-
* @param issuerConf The issuer configuration returned by {@link
|
27
|
+
* @param issuerConf The issuer configuration returned by {@link getIssuerConfig}
|
28
28
|
* @param idpHint Unique identifier of the IDP selected by the user
|
29
29
|
* @returns An object containing the authorization URL
|
30
30
|
*/
|
31
31
|
const buildAuthorizationUrl = async (issuerRequestUri, clientId, issuerConf, idpHint) => {
|
32
|
-
const authzRequestEndpoint = issuerConf.
|
32
|
+
const authzRequestEndpoint = issuerConf.authorization_endpoint;
|
33
33
|
const params = new URLSearchParams({
|
34
34
|
client_id: clientId,
|
35
35
|
request_uri: issuerRequestUri,
|
@@ -43,7 +43,7 @@ const buildAuthorizationUrl = async (issuerRequestUri, clientId, issuerConf, idp
|
|
43
43
|
|
44
44
|
/**
|
45
45
|
* WARNING: This function must be called after obtaining the authorization redirect URL from the webviews (SPID and CIE L3) or browser for CIEID.
|
46
|
-
* Complete User authorization via strong identification when the response mode is "query" and the request credential is a
|
46
|
+
* Complete User authorization via strong identification when the response mode is "query" and the request credential is a urn:eu.europa.ec.eudi:pid:1.
|
47
47
|
* This function parses the authorization redirect URL to extract the authorization response.
|
48
48
|
* @param authRedirectUrl The URL to which the end user should be redirected to start the authentication flow
|
49
49
|
* @returns the authorization response which contains code, state and iss
|
@@ -61,7 +61,7 @@ const completeUserAuthorizationWithQueryMode = async authRedirectUrl => {
|
|
61
61
|
* The information is obtained by performing a GET request to the authorization endpoint with request_uri and client_id parameters.
|
62
62
|
* @param issuerRequestUri the URI of the issuer where the request is sent
|
63
63
|
* @param clientId Identifies the current client across all the requests of the issuing flow returned by {@link startUserAuthorization}
|
64
|
-
* @param issuerConf The issuer configuration returned by {@link
|
64
|
+
* @param issuerConf The issuer configuration returned by {@link getIssuerConfig}
|
65
65
|
* @param appFetch (optional) fetch api implementation. Default: built-in fetch
|
66
66
|
* @throws {ValidationFailed} if an error while validating the response
|
67
67
|
* @returns the request object which contains the credential to be presented in order to obtain the requested credential
|
@@ -69,7 +69,7 @@ const completeUserAuthorizationWithQueryMode = async authRedirectUrl => {
|
|
69
69
|
exports.completeUserAuthorizationWithQueryMode = completeUserAuthorizationWithQueryMode;
|
70
70
|
const getRequestedCredentialToBePresented = async function (issuerRequestUri, clientId, issuerConf) {
|
71
71
|
let appFetch = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : fetch;
|
72
|
-
const authzRequestEndpoint = issuerConf.
|
72
|
+
const authzRequestEndpoint = issuerConf.authorization_endpoint;
|
73
73
|
const params = new URLSearchParams({
|
74
74
|
client_id: clientId,
|
75
75
|
request_uri: issuerRequestUri
|
@@ -93,7 +93,7 @@ const getRequestedCredentialToBePresented = async function (issuerRequestUri, cl
|
|
93
93
|
* The information is obtained by performing a GET request to the authorization endpoint with request_uri and client_id parameters.
|
94
94
|
* @param issuerRequestUri the URI of the issuer where the request is sent
|
95
95
|
* @param clientId Identifies the current client across all the requests of the issuing flow returned by {@link startUserAuthorization}
|
96
|
-
* @param issuerConf The issuer configuration returned by {@link
|
96
|
+
* @param issuerConf The issuer configuration returned by {@link getIssuerConfig}
|
97
97
|
* @param context.walletInstanceAccestation the Wallet Instance's attestation to be presented
|
98
98
|
* @param context.pid the PID to be presented
|
99
99
|
* @param context.wiaCryptoContext The Wallet Instance's crypto context associated with the walletInstanceAttestation parameter
|
@@ -135,7 +135,7 @@ const completeUserAuthorizationWithFormPostJwtMode = async (requestObject, ctx)
|
|
135
135
|
definition_id: `${_reactNativeUuid.default.v4()}`,
|
136
136
|
id: `${_reactNativeUuid.default.v4()}`,
|
137
137
|
descriptor_map: [{
|
138
|
-
id: "
|
138
|
+
id: "urn:eu.europa.ec.eudi:pid:1",
|
139
139
|
path: "$.vp_token[0].vp",
|
140
140
|
format: "vc+sd-jwt"
|
141
141
|
}, {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_auth","require","_misc","_parseUrl","_interopRequireDefault","_errors","_ioReactNativeJwt","_types","_reactNativeUuid","_types2","_decoder","_errors2","obj","__esModule","default","buildAuthorizationUrl","issuerRequestUri","clientId","issuerConf","idpHint","authzRequestEndpoint","
|
1
|
+
{"version":3,"names":["_auth","require","_misc","_parseUrl","_interopRequireDefault","_errors","_ioReactNativeJwt","_types","_reactNativeUuid","_types2","_decoder","_errors2","obj","__esModule","default","buildAuthorizationUrl","issuerRequestUri","clientId","issuerConf","idpHint","authzRequestEndpoint","authorization_endpoint","params","URLSearchParams","client_id","request_uri","idphint","authUrl","exports","completeUserAuthorizationWithQueryMode","authRedirectUrl","query","parseUrl","parseAuthorizationResponse","getRequestedCredentialToBePresented","appFetch","arguments","length","undefined","fetch","requestObject","toString","method","then","hasStatusOrThrow","IssuerResponseError","res","text","jws","decode","reqObj","RequestObject","safeParse","payload","success","ValidationFailed","message","reason","error","data","completeUserAuthorizationWithFormPostJwtMode","ctx","wiaCryptoContext","pidCryptoContext","pid","walletInstanceAttestation","wiaWpToken","SignJWT","setProtectedHeader","alg","typ","setPayload","vp","jti","uuid","v4","nonce","setIssuedAt","setExpirationTime","setAudience","response_uri","sign","pidWpToken","presentationSubmission","definition_id","id","descriptor_map","path","format","authzResponsePayload","encodeBase64","JSON","stringify","state","presentation_submission","vp_token","body","response","resUriRes","headers","reqUri","json","responseUri","ResponseUriResultShape","redirect_uri","getJwtFromFormPost","cbRes","decodedJwt","authRes","authResParsed","AuthorizationResultShape","authErr","AuthorizationErrorShape","AuthorizationError","AuthorizationIdpError","error_description"],"sourceRoot":"../../../../src","sources":["credential/issuance/04-complete-user-authorization.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAKA,IAAAC,KAAA,GAAAD,OAAA;AAEA,IAAAE,SAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAEA,IAAAK,iBAAA,GAAAL,OAAA;AA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E+D,KAAK,IAAKzE,0BAA0B,CAACyE,KAAK,CAACC,UAAU,CAACtD,OAAO,CAAC,CAAC;AAC1E,CAAC;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AANAzB,OAAA,CAAAgC,4CAAA,GAAAA,4CAAA;AAOO,MAAM3B,0BAA0B,GACrC2E,OAAgB,IACQ;EACxB,MAAMC,aAAa,GAAGC,8BAAwB,CAAC1D,SAAS,CAACwD,OAAO,CAAC;EACjE,IAAI,CAACC,aAAa,CAACvD,OAAO,EAAE;IAC1B,MAAMyD,OAAO,GAAGC,6BAAuB,CAAC5D,SAAS,CAACwD,OAAO,CAAC;IAC1D,IAAI,CAACG,OAAO,CAACzD,OAAO,EAAE;MACpB,MAAM,IAAI2D,2BAAkB,CAACJ,aAAa,CAACnD,KAAK,CAACF,OAAO,CAAC,CAAC,CAAC;IAC7D;;IACA,MAAM,IAAI0D,8BAAqB,CAC7BH,OAAO,CAACpD,IAAI,CAACD,KAAK,EAClBqD,OAAO,CAACpD,IAAI,CAACwD,iBACf,CAAC;EACH;EACA,OAAON,aAAa,CAAClD,IAAI;AAC3B,CAAC;AAAC/B,OAAA,CAAAK,0BAAA,GAAAA,0BAAA"}
|
@@ -9,7 +9,6 @@ var _dpop = require("../../utils/dpop");
|
|
9
9
|
var _reactNativeUuid = _interopRequireDefault(require("react-native-uuid"));
|
10
10
|
var _pop = require("../../utils/pop");
|
11
11
|
var WalletInstanceAttestation = _interopRequireWildcard(require("../../wallet-instance-attestation"));
|
12
|
-
var _const = require("./const");
|
13
12
|
var _types = require("./types");
|
14
13
|
var _errors = require("../../utils/errors");
|
15
14
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
@@ -20,7 +19,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
20
19
|
* for requesting the issuance of an access token bound to the public key of the Wallet Instance contained within the DPoP.
|
21
20
|
* This enables the Wallet Instance to request a digital credential.
|
22
21
|
* The DPoP Proof JWT is generated according to the section 4.3 of the DPoP RFC 9449 specification.
|
23
|
-
* @param issuerConf The issuer configuration returned by {@link
|
22
|
+
* @param issuerConf The issuer configuration returned by {@link getIssuerConfig}
|
24
23
|
* @param code The authorization code returned by {@link completeUserAuthorizationWithQueryMode} or {@link completeUserAuthorizationWithFormPost}
|
25
24
|
* @param redirectUri The redirect URI which is the custom URL scheme that the Wallet Instance is registered to handle
|
26
25
|
* @param clientId The client id returned by {@link startUserAuthorization}
|
@@ -40,11 +39,11 @@ const authorizeAccess = async (issuerConf, code, clientId, redirectUri, codeVeri
|
|
40
39
|
wiaCryptoContext,
|
41
40
|
dPopCryptoContext
|
42
41
|
} = context;
|
43
|
-
const parEndpoint = issuerConf.
|
42
|
+
const parEndpoint = issuerConf.pushed_authorization_request_endpoint;
|
44
43
|
const parUrl = new URL(parEndpoint);
|
45
44
|
const aud = `${parUrl.protocol}//${parUrl.hostname}`;
|
46
45
|
const iss = WalletInstanceAttestation.decode(walletInstanceAttestation).payload.cnf.jwk.kid;
|
47
|
-
const tokenUrl = issuerConf.
|
46
|
+
const tokenUrl = issuerConf.token_endpoint;
|
48
47
|
const tokenRequestSignedDPop = await (0, _dpop.createDPopToken)({
|
49
48
|
htm: "POST",
|
50
49
|
htu: tokenUrl,
|
@@ -56,20 +55,20 @@ const authorizeAccess = async (issuerConf, code, clientId, redirectUri, codeVeri
|
|
56
55
|
iss
|
57
56
|
}, wiaCryptoContext);
|
58
57
|
const requestBody = {
|
59
|
-
grant_type: "authorization_code",
|
60
58
|
client_id: clientId,
|
59
|
+
grant_type: "authorization_code",
|
61
60
|
code,
|
62
61
|
redirect_uri: redirectUri,
|
63
|
-
code_verifier: codeVerifier
|
64
|
-
client_assertion_type: _const.ASSERTION_TYPE,
|
65
|
-
client_assertion: walletInstanceAttestation + "~" + signedWiaPoP
|
62
|
+
code_verifier: codeVerifier
|
66
63
|
};
|
67
64
|
const authorizationRequestFormBody = new URLSearchParams(requestBody);
|
68
65
|
const tokenRes = await appFetch(tokenUrl, {
|
69
66
|
method: "POST",
|
70
67
|
headers: {
|
71
68
|
"Content-Type": "application/x-www-form-urlencoded",
|
72
|
-
DPoP: tokenRequestSignedDPop
|
69
|
+
DPoP: tokenRequestSignedDPop,
|
70
|
+
"OAuth-Client-Attestation": walletInstanceAttestation,
|
71
|
+
"OAuth-Client-Attestation-PoP": signedWiaPoP
|
73
72
|
},
|
74
73
|
body: authorizationRequestFormBody.toString()
|
75
74
|
}).then((0, _misc.hasStatusOrThrow)(200, _errors.IssuerResponseError)).then(res => res.json()).then(body => _types.TokenResponse.safeParse(body));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_misc","require","_dpop","_reactNativeUuid","_interopRequireDefault","_pop","WalletInstanceAttestation","_interopRequireWildcard","
|
1
|
+
{"version":3,"names":["_misc","require","_dpop","_reactNativeUuid","_interopRequireDefault","_pop","WalletInstanceAttestation","_interopRequireWildcard","_types","_errors","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","authorizeAccess","issuerConf","code","clientId","redirectUri","codeVerifier","context","appFetch","fetch","walletInstanceAttestation","wiaCryptoContext","dPopCryptoContext","parEndpoint","pushed_authorization_request_endpoint","parUrl","URL","aud","protocol","hostname","iss","decode","payload","cnf","jwk","kid","tokenUrl","token_endpoint","tokenRequestSignedDPop","createDPopToken","htm","htu","jti","uuid","v4","signedWiaPoP","createPopToken","requestBody","client_id","grant_type","redirect_uri","code_verifier","authorizationRequestFormBody","URLSearchParams","tokenRes","method","headers","DPoP","body","toString","then","hasStatusOrThrow","IssuerResponseError","res","json","TokenResponse","safeParse","success","ValidationFail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AG,GAAEC,wBAAI,CAACC,EAAE,CAAC,CAAE,EAAC;IACnBjB,GAAG;IACHG;EACF,CAAC,EACDT,gBACF,CAAC;EAED,MAAM0B,WAAW,GAAG;IAClBC,SAAS,EAAElC,QAAQ;IACnBmC,UAAU,EAAE,oBAAoB;IAChCpC,IAAI;IACJqC,YAAY,EAAEnC,WAAW;IACzBoC,aAAa,EAAEnC;EACjB,CAAC;EAED,MAAMoC,4BAA4B,GAAG,IAAIC,eAAe,CAACN,WAAW,CAAC;EACrE,MAAMO,QAAQ,GAAG,MAAMpC,QAAQ,CAACkB,QAAQ,EAAE;IACxCmB,MAAM,EAAE,MAAM;IACdC,OAAO,EAAE;MACP,cAAc,EAAE,mCAAmC;MACnDC,IAAI,EAAEnB,sBAAsB;MAC5B,0BAA0B,EAAElB,yBAAyB;MACrD,8BAA8B,EAAEyB;IAClC,CAAC;IACDa,IAAI,EAAEN,4BAA4B,CAACO,QAAQ,CAAC;EAC9C,CAAC,CAAC,CACCC,IAAI,CAAC,IAAAC,sBAAgB,EAAC,GAAG,EAAEC,2BAAmB,CAAC,CAAC,CAChDF,IAAI,CAAEG,GAAG,IAAKA,GAAG,CAACC,IAAI,CAAC,CAAC,CAAC,CACzBJ,IAAI,CAAEF,IAAI,IAAKO,oBAAa,CAACC,SAAS,CAACR,IAAI,CAAC,CAAC;EAEhD,IAAI,CAACJ,QAAQ,CAACa,OAAO,EAAE;IACrB,MAAM,IAAIC,wBAAgB,CAAC;MACzBC,OAAO,EAAE,kCAAkC;MAC3CC,MAAM,EAAEhB,QAAQ,CAACiB,KAAK,CAACF;IACzB,CAAC,CAAC;EACJ;EAEA,OAAO;IAAEG,WAAW,EAAElB,QAAQ,CAACmB;EAAK,CAAC;AACvC,CAAC;AAACC,OAAA,CAAA/D,eAAA,GAAAA,eAAA"}
|
@@ -27,7 +27,7 @@ const createNonceProof = async (nonce, issuer, audience, ctx) => {
|
|
27
27
|
* of the Credential Issuer to request the issuance of a credential linked to the public key contained in the JWT proof.
|
28
28
|
* The Openid4vci proof JWT incapsulates the nonce extracted from the token response from the {@link authorizeAccess} step.
|
29
29
|
* The credential request is sent to the Credential Endpoint of the Credential Issuer via HTTP POST with the type of the credential, its format, the access token and the JWT proof.
|
30
|
-
* @param issuerConf The issuer configuration returned by {@link
|
30
|
+
* @param issuerConf The issuer configuration returned by {@link getIssuerConfig}
|
31
31
|
* @param accessToken The access token response returned by {@link authorizeAccess}
|
32
32
|
* @param clientId The client id returned by {@link startUserAuthorization}
|
33
33
|
* @param credentialDefinition The credential definition of the credential to be obtained returned by {@link startUserAuthorization}
|
@@ -44,7 +44,7 @@ const obtainCredential = async (issuerConf, accessToken, clientId, credentialDef
|
|
44
44
|
appFetch = fetch,
|
45
45
|
dPopCryptoContext
|
46
46
|
} = context;
|
47
|
-
const credentialUrl = issuerConf.
|
47
|
+
const credentialUrl = issuerConf.credential_endpoint;
|
48
48
|
|
49
49
|
/**
|
50
50
|
* JWT proof token to bind the request nonce to the key that will bind the holder User with the Credential
|
@@ -52,21 +52,29 @@ const obtainCredential = async (issuerConf, accessToken, clientId, credentialDef
|
|
52
52
|
* @see https://openid.net/specs/openid-4-verifiable-credential-issuance-1_0.html#name-proof-types
|
53
53
|
*/
|
54
54
|
const signedNonceProof = await createNonceProof(accessToken.c_nonce, clientId, credentialUrl, credentialCryptoContext);
|
55
|
-
|
56
|
-
// Validation of accessTokenResponse.authorization_details if contain credentialDefinition
|
57
|
-
const containsCredentialDefinition = accessToken.authorization_details.some(c => c.credential_configuration_id === credentialDefinition.credential_configuration_id && c.format === credentialDefinition.format && c.type === credentialDefinition.type);
|
55
|
+
const containsCredentialDefinition = accessToken.authorization_details.credential_configuration_id === credentialDefinition.credential_configuration_id && accessToken.authorization_details.type === credentialDefinition.type;
|
58
56
|
if (!containsCredentialDefinition) {
|
59
57
|
throw new _errors.ValidationFailed({
|
60
58
|
message: "The access token response does not contain the requested credential"
|
61
59
|
});
|
62
60
|
}
|
61
|
+
const credential = issuerConf.credential_configurations_supported[credentialDefinition.credential_configuration_id];
|
62
|
+
if (!credential) {
|
63
|
+
throw new _errors.ValidationFailed({
|
64
|
+
message: "The credential configuration is not supported by the issuer"
|
65
|
+
});
|
66
|
+
}
|
67
|
+
const format = credential.format;
|
68
|
+
if (!format) {
|
69
|
+
throw new _errors.ValidationFailed({
|
70
|
+
message: "The credential doesn't contain the format required by the issuer"
|
71
|
+
});
|
72
|
+
}
|
63
73
|
|
64
74
|
/** The credential request body */
|
65
75
|
const credentialRequestFormBody = {
|
66
|
-
|
67
|
-
|
68
|
-
},
|
69
|
-
format: credentialDefinition.format,
|
76
|
+
vct: credentialDefinition.credential_configuration_id,
|
77
|
+
format,
|
70
78
|
proof: {
|
71
79
|
jwt: signedNonceProof,
|
72
80
|
proof_type: "jwt"
|
@@ -107,18 +115,7 @@ const handleObtainCredentialError = e => {
|
|
107
115
|
if (!(e instanceof _errors.UnexpectedStatusCodeError)) {
|
108
116
|
throw e;
|
109
117
|
}
|
110
|
-
throw new _errors.ResponseErrorBuilder(_errors.IssuerResponseError).handle(
|
111
|
-
// Although it is technically not an error, we handle it as such to avoid
|
112
|
-
// changing the return type of `obtainCredential` and introduce a breaking change.
|
113
|
-
code: _errors.IssuerResponseErrorCodes.CredentialIssuingNotSynchronous,
|
114
|
-
message: "This credential cannot be issued synchronously. It will be available at a later time."
|
115
|
-
}).handle(403, {
|
116
|
-
code: _errors.IssuerResponseErrorCodes.CredentialInvalidStatus,
|
117
|
-
message: "Invalid status found for the given credential"
|
118
|
-
}).handle(404, {
|
119
|
-
code: _errors.IssuerResponseErrorCodes.CredentialInvalidStatus,
|
120
|
-
message: "Invalid status found for the given credential"
|
121
|
-
}).handle("*", {
|
118
|
+
throw new _errors.ResponseErrorBuilder(_errors.IssuerResponseError).handle("*", {
|
122
119
|
code: _errors.IssuerResponseErrorCodes.CredentialRequestFailed,
|
123
120
|
message: "Unable to obtain the requested credential"
|
124
121
|
}).buildFrom(e);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_ioReactNativeJwt","require","_misc","_errors","_types","_dpop","_reactNativeUuid","_interopRequireDefault","obj","__esModule","default","createNonceProof","nonce","issuer","audience","ctx","jwk","getPublicKey","SignJWT","setPayload","setProtectedHeader","typ","setAudience","setIssuer","setIssuedAt","setExpirationTime","sign","exports","obtainCredential","issuerConf","accessToken","clientId","credentialDefinition","context","credentialCryptoContext","appFetch","fetch","dPopCryptoContext","credentialUrl","
|
1
|
+
{"version":3,"names":["_ioReactNativeJwt","require","_misc","_errors","_types","_dpop","_reactNativeUuid","_interopRequireDefault","obj","__esModule","default","createNonceProof","nonce","issuer","audience","ctx","jwk","getPublicKey","SignJWT","setPayload","setProtectedHeader","typ","setAudience","setIssuer","setIssuedAt","setExpirationTime","sign","exports","obtainCredential","issuerConf","accessToken","clientId","credentialDefinition","context","credentialCryptoContext","appFetch","fetch","dPopCryptoContext","credentialUrl","credential_endpoint","signedNonceProof","c_nonce","containsCredentialDefinition","authorization_details","credential_configuration_id","type","ValidationFailed","message","credential","credential_configurations_supported","format","credentialRequestFormBody","vct","proof","jwt","proof_type","tokenRequestSignedDPop","createDPopToken","htm","htu","jti","uuid","v4","ath","sha256ToBase64","access_token","credentialRes","method","headers","DPoP","Authorization","token_type","body","JSON","stringify","then","hasStatusOrThrow","res","json","CredentialResponse","safeParse","catch","handleObtainCredentialError","success","reason","error","data","e","UnexpectedStatusCodeError","ResponseErrorBuilder","IssuerResponseError","handle","code","IssuerResponseErrorCodes","CredentialRequestFailed","buildFrom"],"sourceRoot":"../../../../src","sources":["credential/issuance/06-obtain-credential.ts"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AAOA,IAAAC,KAAA,GAAAD,OAAA;AAEA,IAAAE,OAAA,GAAAF,OAAA;AAOA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,gBAAA,GAAAC,sBAAA,CAAAN,OAAA;AAAqC,SAAAM,uBAAAC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,sBAAgB,EAAC,GAAG,CAAC,CAAC,CAC3BD,IAAI,CAAEE,GAAG,IAAKA,GAAG,CAACC,IAAI,CAAC,CAAC,CAAC,CACzBH,IAAI,CAAEH,IAAI,IAAKO,yBAAkB,CAACC,SAAS,CAACR,IAAI,CAAC,CAAC,CAClDS,KAAK,CAACC,2BAA2B,CAAC;EAErC,IAAI,CAAChB,aAAa,CAACiB,OAAO,EAAE;IAC1B,MAAM,IAAIrC,wBAAgB,CAAC;MACzBC,OAAO,EAAE,uCAAuC;MAChDqC,MAAM,EAAElB,aAAa,CAACmB,KAAK,CAACtC;IAC9B,CAAC,CAAC;EACJ;EAEA,OAAOmB,aAAa,CAACoB,IAAI;AAC3B,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AALA3D,OAAA,CAAAC,gBAAA,GAAAA,gBAAA;AAMA,MAAMsD,2BAA2B,GAAIK,CAAU,IAAK;EAClD,IAAI,EAAEA,CAAC,YAAYC,iCAAyB,CAAC,EAAE;IAC7C,MAAMD,CAAC;EACT;EAEA,MAAM,IAAIE,4BAAoB,CAACC,2BAAmB,CAAC,CAChDC,MAAM,CAAC,GAAG,EAAE;IACXC,IAAI,EAAEC,gCAAwB,CAACC,uBAAuB;IACtD/C,OAAO,EAAE;EACX,CAAC,CAAC,CACDgD,SAAS,CAACR,CAAC,CAAC;AACjB,CAAC"}
|
@@ -137,8 +137,8 @@ const verifyAndParseCredentialSdJwt = async (issuerConf, credential, _, _ref8) =
|
|
137
137
|
ignoreMissingAttributes,
|
138
138
|
includeUndefinedAttributes
|
139
139
|
} = _ref8;
|
140
|
-
const decoded = await verifyCredentialSdJwt(credential, issuerConf.
|
141
|
-
const parsedCredential = parseCredentialSdJwt(issuerConf.
|
140
|
+
const decoded = await verifyCredentialSdJwt(credential, issuerConf.keys, credentialCryptoContext);
|
141
|
+
const parsedCredential = parseCredentialSdJwt(issuerConf.credential_configurations_supported, decoded, ignoreMissingAttributes, includeUndefinedAttributes);
|
142
142
|
const maybeIssuedAt = (0, _converters.getValueFromDisclosures)(decoded.disclosures, "iat");
|
143
143
|
return {
|
144
144
|
parsedCredential,
|
@@ -149,7 +149,7 @@ const verifyAndParseCredentialSdJwt = async (issuerConf, credential, _, _ref8) =
|
|
149
149
|
|
150
150
|
/**
|
151
151
|
* Verify and parse an encoded credential.
|
152
|
-
* @param issuerConf The Issuer configuration returned by {@link
|
152
|
+
* @param issuerConf The Issuer configuration returned by {@link getIssuerConfig}
|
153
153
|
* @param credential The encoded credential returned by {@link obtainCredential}
|
154
154
|
* @param format The format of the credentual returned by {@link obtainCredential}
|
155
155
|
* @param context.credentialCryptoContext The crypto context used to obtain the credential in {@link obtainCredential}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_errors","require","_types","_sdJwt","_converters","parseCredentialSdJwt","credentials_supported","_ref","sdJwt","disclosures","ignoreMissingAttributes","arguments","length","undefined","includeUndefinedAttributes","credentialSubject","payload","vct","IoWalletError","format","header","typ","claims","attrDefinitions","Object","entries","attrsNotInDisclosures","filter","_ref2","attrKey","some","_ref3","name","missing","map","_","join","received","definedValues","fromEntries","_ref4","_disclosures$find","definition","value","find","_ref5","display","reduce","names","_ref6","locale","undefinedValues","keys","includes","_ref7","key","verifyCredentialSdJwt","rawCredential","issuerKeys","holderBindingContext","decodedCredential","holderBindingKey","Promise","all","verifySdJwt","SdJwt4VC","getPublicKey","cnf","jwk","kid","verifyAndParseCredentialSdJwt","issuerConf","credential","_ref8","credentialCryptoContext","decoded","
|
1
|
+
{"version":3,"names":["_errors","require","_types","_sdJwt","_converters","parseCredentialSdJwt","credentials_supported","_ref","sdJwt","disclosures","ignoreMissingAttributes","arguments","length","undefined","includeUndefinedAttributes","credentialSubject","payload","vct","IoWalletError","format","header","typ","claims","attrDefinitions","Object","entries","attrsNotInDisclosures","filter","_ref2","attrKey","some","_ref3","name","missing","map","_","join","received","definedValues","fromEntries","_ref4","_disclosures$find","definition","value","find","_ref5","display","reduce","names","_ref6","locale","undefinedValues","keys","includes","_ref7","key","verifyCredentialSdJwt","rawCredential","issuerKeys","holderBindingContext","decodedCredential","holderBindingKey","Promise","all","verifySdJwt","SdJwt4VC","getPublicKey","cnf","jwk","kid","verifyAndParseCredentialSdJwt","issuerConf","credential","_ref8","credentialCryptoContext","decoded","parsedCredential","credential_configurations_supported","maybeIssuedAt","getValueFromDisclosures","expiration","Date","exp","issuedAt","verifyAndParseCredential","context","exports"],"sourceRoot":"../../../../src","sources":["credential/issuance/07-verify-and-parse-credential.ts"],"mappings":";;;;;;AAGA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AAyBA;;AAkBA;;AAKA,MAAMI,oBAAoB,GAAG,SAAAA,CAE3BC,qBAAgG,EAAAC,IAAA,EAI3E;EAAA,IAHrB;IAAEC,KAAK;IAAEC;EAAoC,CAAC,GAAAF,IAAA;EAAA,IAC9CG,uBAAgC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,KAAK;EAAA,IACxCG,0BAAmC,GAAAH,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,KAAK;EAE3C,MAAMI,iBAAiB,GAAGT,qBAAqB,CAACE,KAAK,CAACQ,OAAO,CAACC,GAAG,CAAC;EAElE,IAAI,CAACF,iBAAiB,EAAE;IACtB,MAAM,IAAIG,qBAAa,CAAC,6CAA6C,CAAC;EACxE;EAEA,IAAIH,iBAAiB,CAACI,MAAM,KAAKX,KAAK,CAACY,MAAM,CAACC,GAAG,EAAE;IACjD,MAAM,IAAIH,qBAAa,CACpB,gEAA+DH,iBAAiB,CAACI,MAAO,gBAAeX,KAAK,CAACY,MAAM,CAACC,GAAI,KAC3H,CAAC;EACH;;EAEA;EACA,IAAI,CAACN,iBAAiB,CAACO,MAAM,EAAE;IAC7B,MAAM,IA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