@pagopa/io-react-native-wallet 0.2.1 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/commonjs/index.js +9 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/pid/issuing.js +28 -0
- package/lib/commonjs/pid/issuing.js.map +1 -1
- package/lib/commonjs/pid/metadata.js +51 -0
- package/lib/commonjs/pid/metadata.js.map +1 -0
- package/lib/commonjs/pid/sd-jwt/index.js +2 -1
- package/lib/commonjs/pid/sd-jwt/index.js.map +1 -1
- package/lib/commonjs/rp/__test__/index.test.js +3 -5
- package/lib/commonjs/rp/__test__/index.test.js.map +1 -1
- package/lib/commonjs/rp/index.js +165 -15
- package/lib/commonjs/rp/index.js.map +1 -1
- package/lib/commonjs/rp/types.js +13 -1
- package/lib/commonjs/rp/types.js.map +1 -1
- package/lib/commonjs/sd-jwt/__test__/index.test.js +119 -0
- package/lib/commonjs/sd-jwt/__test__/index.test.js.map +1 -0
- package/lib/commonjs/sd-jwt/index.js +84 -4
- package/lib/commonjs/sd-jwt/index.js.map +1 -1
- package/lib/commonjs/sd-jwt/types.js +9 -0
- package/lib/commonjs/sd-jwt/types.js.map +1 -1
- package/lib/commonjs/sd-jwt/verifier.js +7 -5
- package/lib/commonjs/sd-jwt/verifier.js.map +1 -1
- package/lib/commonjs/utils/errors.js +76 -1
- package/lib/commonjs/utils/errors.js.map +1 -1
- package/lib/module/index.js +5 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/pid/issuing.js +30 -2
- package/lib/module/pid/issuing.js.map +1 -1
- package/lib/module/pid/metadata.js +43 -0
- package/lib/module/pid/metadata.js.map +1 -0
- package/lib/module/pid/sd-jwt/index.js +3 -3
- package/lib/module/pid/sd-jwt/index.js.map +1 -1
- package/lib/module/rp/__test__/index.test.js +3 -5
- package/lib/module/rp/__test__/index.test.js.map +1 -1
- package/lib/module/rp/index.js +168 -18
- package/lib/module/rp/index.js.map +1 -1
- package/lib/module/rp/types.js +11 -0
- package/lib/module/rp/types.js.map +1 -1
- package/lib/module/sd-jwt/__test__/index.test.js +118 -0
- package/lib/module/sd-jwt/__test__/index.test.js.map +1 -0
- package/lib/module/sd-jwt/index.js +83 -3
- package/lib/module/sd-jwt/index.js.map +1 -1
- package/lib/module/sd-jwt/types.js +10 -0
- package/lib/module/sd-jwt/types.js.map +1 -1
- package/lib/module/sd-jwt/verifier.js +8 -6
- package/lib/module/sd-jwt/verifier.js.map +1 -1
- package/lib/module/utils/errors.js +71 -0
- package/lib/module/utils/errors.js.map +1 -1
- package/lib/typescript/{index.d.ts → src/index.d.ts} +3 -1
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/pid/index.d.ts.map +1 -0
- package/lib/typescript/{pid → src/pid}/issuing.d.ts +9 -0
- package/lib/typescript/src/pid/issuing.d.ts.map +1 -0
- package/lib/typescript/src/pid/metadata.d.ts +528 -0
- package/lib/typescript/src/pid/metadata.d.ts.map +1 -0
- package/lib/typescript/src/pid/sd-jwt/converters.d.ts.map +1 -0
- package/lib/typescript/{pid → src/pid}/sd-jwt/index.d.ts +1 -1
- package/lib/typescript/src/pid/sd-jwt/index.d.ts.map +1 -0
- package/lib/typescript/src/pid/sd-jwt/types.d.ts.map +1 -0
- package/lib/typescript/src/rp/__test__/index.test.d.ts.map +1 -0
- package/lib/typescript/src/rp/index.d.ts +89 -0
- package/lib/typescript/src/rp/index.d.ts.map +1 -0
- package/lib/typescript/{rp → src/rp}/types.d.ts +71 -47
- package/lib/typescript/{rp → src/rp}/types.d.ts.map +1 -1
- package/lib/typescript/src/sd-jwt/__test__/converters.test.d.ts.map +1 -0
- package/lib/typescript/src/sd-jwt/__test__/index.test.d.ts +2 -0
- package/lib/typescript/src/sd-jwt/__test__/index.test.d.ts.map +1 -0
- package/lib/typescript/src/sd-jwt/__test__/types.test.d.ts.map +1 -0
- package/lib/typescript/src/sd-jwt/converters.d.ts.map +1 -0
- package/lib/typescript/{sd-jwt → src/sd-jwt}/index.d.ts +22 -2
- package/lib/typescript/src/sd-jwt/index.d.ts.map +1 -0
- package/lib/typescript/{sd-jwt → src/sd-jwt}/types.d.ts +12 -0
- package/lib/typescript/src/sd-jwt/types.d.ts.map +1 -0
- package/lib/typescript/src/sd-jwt/verifier.d.ts +3 -0
- package/lib/typescript/src/sd-jwt/verifier.d.ts.map +1 -0
- package/lib/typescript/src/utils/dpop.d.ts.map +1 -0
- package/lib/typescript/{utils → src/utils}/errors.d.ts +41 -0
- package/lib/typescript/src/utils/errors.d.ts.map +1 -0
- package/lib/typescript/src/utils/jwk.d.ts.map +1 -0
- package/lib/typescript/src/wallet-instance-attestation/index.d.ts.map +1 -0
- package/lib/typescript/src/wallet-instance-attestation/issuing.d.ts.map +1 -0
- package/lib/typescript/{wallet-instance-attestation → src/wallet-instance-attestation}/types.d.ts +8 -8
- package/lib/typescript/{wallet-instance-attestation → src/wallet-instance-attestation}/types.d.ts.map +1 -1
- package/package.json +7 -5
- package/src/index.ts +13 -1
- package/src/pid/issuing.ts +38 -1
- package/src/pid/metadata.ts +46 -0
- package/src/pid/sd-jwt/index.ts +7 -4
- package/src/rp/__test__/index.test.ts +5 -9
- package/src/rp/index.ts +208 -24
- package/src/rp/types.ts +16 -0
- package/src/sd-jwt/__test__/index.test.ts +171 -0
- package/src/sd-jwt/index.ts +84 -7
- package/src/sd-jwt/types.ts +13 -0
- package/src/sd-jwt/verifier.ts +5 -7
- package/src/utils/errors.ts +81 -0
- package/lib/typescript/index.d.ts.map +0 -1
- package/lib/typescript/pid/index.d.ts.map +0 -1
- package/lib/typescript/pid/issuing.d.ts.map +0 -1
- package/lib/typescript/pid/sd-jwt/converters.d.ts.map +0 -1
- package/lib/typescript/pid/sd-jwt/index.d.ts.map +0 -1
- package/lib/typescript/pid/sd-jwt/types.d.ts.map +0 -1
- package/lib/typescript/rp/__test__/index.test.d.ts.map +0 -1
- package/lib/typescript/rp/index.d.ts +0 -43
- package/lib/typescript/rp/index.d.ts.map +0 -1
- package/lib/typescript/sd-jwt/__test__/converters.test.d.ts.map +0 -1
- package/lib/typescript/sd-jwt/__test__/types.test.d.ts.map +0 -1
- package/lib/typescript/sd-jwt/converters.d.ts.map +0 -1
- package/lib/typescript/sd-jwt/index.d.ts.map +0 -1
- package/lib/typescript/sd-jwt/types.d.ts.map +0 -1
- package/lib/typescript/sd-jwt/verifier.d.ts +0 -3
- package/lib/typescript/sd-jwt/verifier.d.ts.map +0 -1
- package/lib/typescript/utils/dpop.d.ts.map +0 -1
- package/lib/typescript/utils/errors.d.ts.map +0 -1
- package/lib/typescript/utils/jwk.d.ts.map +0 -1
- package/lib/typescript/wallet-instance-attestation/index.d.ts.map +0 -1
- package/lib/typescript/wallet-instance-attestation/issuing.d.ts.map +0 -1
- /package/lib/typescript/{pid → src/pid}/index.d.ts +0 -0
- /package/lib/typescript/{pid → src/pid}/sd-jwt/converters.d.ts +0 -0
- /package/lib/typescript/{pid → src/pid}/sd-jwt/types.d.ts +0 -0
- /package/lib/typescript/{rp → src/rp}/__test__/index.test.d.ts +0 -0
- /package/lib/typescript/{sd-jwt → src/sd-jwt}/__test__/converters.test.d.ts +0 -0
- /package/lib/typescript/{sd-jwt → src/sd-jwt}/__test__/types.test.d.ts +0 -0
- /package/lib/typescript/{sd-jwt → src/sd-jwt}/converters.d.ts +0 -0
- /package/lib/typescript/{utils → src/utils}/dpop.d.ts +0 -0
- /package/lib/typescript/{utils → src/utils}/jwk.d.ts +0 -0
- /package/lib/typescript/{wallet-instance-attestation → src/wallet-instance-attestation}/index.d.ts +0 -0
- /package/lib/typescript/{wallet-instance-attestation → src/wallet-instance-attestation}/issuing.d.ts +0 -0
package/lib/commonjs/index.js
CHANGED
@@ -3,13 +3,21 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.
|
6
|
+
exports.RP = exports.PID = exports.Errors = void 0;
|
7
|
+
Object.defineProperty(exports, "RelyingPartySolution", {
|
8
|
+
enumerable: true,
|
9
|
+
get: function () {
|
10
|
+
return RP.RelyingPartySolution;
|
11
|
+
}
|
12
|
+
});
|
13
|
+
exports.WalletInstanceAttestation = void 0;
|
7
14
|
Object.defineProperty(exports, "getUnsignedDPop", {
|
8
15
|
enumerable: true,
|
9
16
|
get: function () {
|
10
17
|
return _dpop.getUnsignedDPop;
|
11
18
|
}
|
12
19
|
});
|
20
|
+
require("react-native-url-polyfill/auto");
|
13
21
|
var PID = _interopRequireWildcard(require("./pid"));
|
14
22
|
exports.PID = PID;
|
15
23
|
var RP = _interopRequireWildcard(require("./rp"));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["
|
1
|
+
{"version":3,"names":["require","PID","_interopRequireWildcard","exports","RP","Errors","WalletInstanceAttestation","_dpop","_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":["index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;AAEAA,OAAA;AAEA,IAAAC,GAAA,GAAAC,uBAAA,CAAAF,OAAA;AAA6BG,OAAA,CAAAF,GAAA,GAAAA,GAAA;AAC7B,IAAAG,EAAA,GAAAF,uBAAA,CAAAF,OAAA;AAA2BG,OAAA,CAAAC,EAAA,GAAAA,EAAA;AAC3B,IAAAC,MAAA,GAAAH,uBAAA,CAAAF,OAAA;AAAyCG,OAAA,CAAAE,MAAA,GAAAA,MAAA;AACzC,IAAAC,yBAAA,GAAAJ,uBAAA,CAAAF,OAAA;AAA2EG,OAAA,CAAAG,yBAAA,GAAAA,yBAAA;AAC3E,IAAAC,KAAA,GAAAP,OAAA;AAA+C,SAAAQ,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,SAAAP,wBAAAW,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"}
|
@@ -10,6 +10,7 @@ var _reactNativeUuid = _interopRequireDefault(require("react-native-uuid"));
|
|
10
10
|
var _errors = require("../utils/errors");
|
11
11
|
var _dpop = require("../utils/dpop");
|
12
12
|
var _ioReactNativeCrypto = require("@pagopa/io-react-native-crypto");
|
13
|
+
var _metadata = require("./metadata");
|
13
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
14
15
|
// This is a temporary type that will be used for demo purposes only
|
15
16
|
|
@@ -226,6 +227,33 @@ class Issuing {
|
|
226
227
|
}
|
227
228
|
throw new _errors.PidIssuingError(`Unable to obtain credential!`);
|
228
229
|
}
|
230
|
+
|
231
|
+
/**
|
232
|
+
* Obtain the PID issuer metadata
|
233
|
+
*
|
234
|
+
* @function
|
235
|
+
* @returns PID issuer metadata
|
236
|
+
*
|
237
|
+
*/
|
238
|
+
async getEntityConfiguration() {
|
239
|
+
const metadataUrl = new URL(".well-known/openid-federation", this.pidProviderBaseUrl).href;
|
240
|
+
const response = await this.appFetch(metadataUrl);
|
241
|
+
if (response.status === 200) {
|
242
|
+
const jwtMetadata = await response.text();
|
243
|
+
const {
|
244
|
+
payload
|
245
|
+
} = (0, _ioReactNativeJwt.decode)(jwtMetadata);
|
246
|
+
const result = _metadata.PidIssuerEntityConfiguration.safeParse(payload);
|
247
|
+
if (result.success) {
|
248
|
+
const parsedMetadata = result.data;
|
249
|
+
await (0, _ioReactNativeJwt.verify)(jwtMetadata, parsedMetadata.jwks.keys);
|
250
|
+
return parsedMetadata;
|
251
|
+
} else {
|
252
|
+
throw new _errors.PidMetadataError(result.error.message);
|
253
|
+
}
|
254
|
+
}
|
255
|
+
throw new _errors.PidMetadataError(`Unable to obtain PID metadata. Response: ${await response.text()} with status: ${response.status}`);
|
256
|
+
}
|
229
257
|
}
|
230
258
|
exports.Issuing = Issuing;
|
231
259
|
//# sourceMappingURL=issuing.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_ioReactNativeJwt","require","_jwk","_reactNativeUuid","_interopRequireDefault","_errors","_dpop","_ioReactNativeCrypto","obj","__esModule","default","Issuing","constructor","pidProviderBaseUrl","walletProviderBaseUrl","walletInstanceAttestation","clientId","appFetch","arguments","length","undefined","fetch","state","uuid","v4","codeVerifier","authorizationCode","getUnsignedJwtForPar","jwk","parsedJwk","JWK","parse","keyThumbprint","thumbprint","publicKey","kid","codeChallenge","sha256ToBase64","unsignedJwtForPar","SignJWT","client_assertion_type","authorization_details","credentialDefinition","type","format","response_type","code_challenge_method","redirect_uri","client_id","code_challenge","setProtectedHeader","alg","setIssuedAt","setExpirationTime","toSign","getPar","signature","signedJwtForPar","appendSignature","parUrl","URL","href","requestBody","client_assertion","request","formBody","URLSearchParams","response","method","headers","body","toString","status","result","json","request_uri","PidIssuingError","text","getUnsignedDPoP","tokenUrl","dPop","getUnsignedDPop","htm","htu","jti","getAuthToken","dPopKeyTag","dPopKey","generate","unsignedDPopForToken","dPopTokenSignature","sign","deleteKey","signedDPop","decodedJwtDPop","decodeJwt","payload","grant_type","code","code_verifier","DPoP","getUnsignedNonceProof","nonce","unsignedProof","setAudience","setIssuer","getCredential","unsignedDPopForPid","dPopPidSignature","unsignedNonceProof","nonceProofSignature","accessToken","cieData","signedDPopForPid","signedNonceProof","credentialUrl","credential_definition","JSON","stringify","proof","jwt","proof_type","Authorization","exports"],"sourceRoot":"../../../src","sources":["pid/issuing.ts"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;
|
1
|
+
{"version":3,"names":["_ioReactNativeJwt","require","_jwk","_reactNativeUuid","_interopRequireDefault","_errors","_dpop","_ioReactNativeCrypto","_metadata","obj","__esModule","default","Issuing","constructor","pidProviderBaseUrl","walletProviderBaseUrl","walletInstanceAttestation","clientId","appFetch","arguments","length","undefined","fetch","state","uuid","v4","codeVerifier","authorizationCode","getUnsignedJwtForPar","jwk","parsedJwk","JWK","parse","keyThumbprint","thumbprint","publicKey","kid","codeChallenge","sha256ToBase64","unsignedJwtForPar","SignJWT","client_assertion_type","authorization_details","credentialDefinition","type","format","response_type","code_challenge_method","redirect_uri","client_id","code_challenge","setProtectedHeader","alg","setIssuedAt","setExpirationTime","toSign","getPar","signature","signedJwtForPar","appendSignature","parUrl","URL","href","requestBody","client_assertion","request","formBody","URLSearchParams","response","method","headers","body","toString","status","result","json","request_uri","PidIssuingError","text","getUnsignedDPoP","tokenUrl","dPop","getUnsignedDPop","htm","htu","jti","getAuthToken","dPopKeyTag","dPopKey","generate","unsignedDPopForToken","dPopTokenSignature","sign","deleteKey","signedDPop","decodedJwtDPop","decodeJwt","payload","grant_type","code","code_verifier","DPoP","getUnsignedNonceProof","nonce","unsignedProof","setAudience","setIssuer","getCredential","unsignedDPopForPid","dPopPidSignature","unsignedNonceProof","nonceProofSignature","accessToken","cieData","signedDPopForPid","signedNonceProof","credentialUrl","credential_definition","JSON","stringify","proof","jwt","proof_type","Authorization","getEntityConfiguration","metadataUrl","jwtMetadata","PidIssuerEntityConfiguration","safeParse","success","parsedMetadata","data","verifyJwt","jwks","keys","PidMetadataError","error","message","exports"],"sourceRoot":"../../../src","sources":["pid/issuing.ts"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AAOA,IAAAC,IAAA,GAAAD,OAAA;AACA,IAAAE,gBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,oBAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAP,OAAA;AAA0D,SAAAG,uBAAAK,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAE1D;;AAgBO,MAAMG,OAAO,CAAC;EAUnBC,WAAWA,CACTC,kBAA0B,EAC1BC,qBAA6B,EAC7BC,yBAAiC,EACjCC,QAAgB,EAEhB;IAAA,IADAC,QAA8B,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAGG,KAAK;IAEtC,IAAI,CAACR,kBAAkB,GAAGA,kBAAkB;IAC5C,IAAI,CAACC,qBAAqB,GAAGA,qBAAqB;IAClD,IAAI,CAACQ,KAAK,GAAI,GAAEC,wBAAI,CAACC,EAAE,CAAC,CAAE,EAAC;IAC3B,IAAI,CAACC,YAAY,GAAI,GAAEF,wBAAI,CAACC,EAAE,CAAC,CAAE,EAAC;IAClC,IAAI,CAAC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IzD,QAAQ,CAACK,MAAM,KAAK,GAAG,EAAE;MAC3B,MAAMqD,WAAW,GAAG,MAAM1D,QAAQ,CAACU,IAAI,CAAC,CAAC;MACzC,MAAM;QAAEmB;MAAQ,CAAC,GAAG,IAAAD,wBAAS,EAAC8B,WAAW,CAAC;MAC1C,MAAMpD,MAAM,GAAGqD,sCAA4B,CAACC,SAAS,CAAC/B,OAAO,CAAC;MAC9D,IAAIvB,MAAM,CAACuD,OAAO,EAAE;QAClB,MAAMC,cAAc,GAAGxD,MAAM,CAACyD,IAAI;QAClC,MAAM,IAAAC,wBAAS,EAACN,WAAW,EAAEI,cAAc,CAACG,IAAI,CAACC,IAAI,CAAC;QACtD,OAAOJ,cAAc;MACvB,CAAC,MAAM;QACL,MAAM,IAAIK,wBAAgB,CAAC7D,MAAM,CAAC8D,KAAK,CAACC,OAAO,CAAC;MAClD;IACF;IAEA,MAAM,IAAIF,wBAAgB,CACvB,4CAA2C,MAAMnE,QAAQ,CAACU,IAAI,CAAC,CAAE,iBAChEV,QAAQ,CAACK,MACV,EACH,CAAC;EACH;AACF;AAACiE,OAAA,CAAA9H,OAAA,GAAAA,OAAA"}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.PidIssuerEntityConfiguration = exports.PidDisplayMetadata = void 0;
|
7
|
+
var _jwk = require("../utils/jwk");
|
8
|
+
var _zod = require("zod");
|
9
|
+
const PidDisplayMetadata = _zod.z.object({
|
10
|
+
name: _zod.z.string(),
|
11
|
+
locale: _zod.z.string(),
|
12
|
+
logo: _zod.z.object({
|
13
|
+
url: _zod.z.string(),
|
14
|
+
alt_text: _zod.z.string()
|
15
|
+
}),
|
16
|
+
background_color: _zod.z.string(),
|
17
|
+
text_color: _zod.z.string()
|
18
|
+
});
|
19
|
+
exports.PidDisplayMetadata = PidDisplayMetadata;
|
20
|
+
const PidIssuerEntityConfiguration = _zod.z.object({
|
21
|
+
jwks: _zod.z.object({
|
22
|
+
keys: _zod.z.array(_jwk.JWK)
|
23
|
+
}),
|
24
|
+
metadata: _zod.z.object({
|
25
|
+
openid_credential_issuer: _zod.z.object({
|
26
|
+
credential_issuer: _zod.z.string(),
|
27
|
+
authorization_endpoint: _zod.z.string(),
|
28
|
+
token_endpoint: _zod.z.string(),
|
29
|
+
pushed_authorization_request_endpoint: _zod.z.string(),
|
30
|
+
dpop_signing_alg_values_supported: _zod.z.array(_zod.z.string()),
|
31
|
+
credential_endpoint: _zod.z.string(),
|
32
|
+
credentials_supported: _zod.z.object({
|
33
|
+
"eu.eudiw.pid.it": _zod.z.object({
|
34
|
+
format: _zod.z.literal("vc+sd-jwt"),
|
35
|
+
cryptographic_binding_methods_supported: _zod.z.array(_zod.z.string()),
|
36
|
+
cryptographic_suites_supported: _zod.z.array(_zod.z.string()),
|
37
|
+
display: _zod.z.array(PidDisplayMetadata)
|
38
|
+
})
|
39
|
+
})
|
40
|
+
}),
|
41
|
+
federation_entity: _zod.z.object({
|
42
|
+
organization_name: _zod.z.string(),
|
43
|
+
homepage_uri: _zod.z.string(),
|
44
|
+
policy_uri: _zod.z.string(),
|
45
|
+
tos_uri: _zod.z.string(),
|
46
|
+
logo_uri: _zod.z.string()
|
47
|
+
})
|
48
|
+
})
|
49
|
+
});
|
50
|
+
exports.PidIssuerEntityConfiguration = PidIssuerEntityConfiguration;
|
51
|
+
//# sourceMappingURL=metadata.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["_jwk","require","_zod","PidDisplayMetadata","z","object","name","string","locale","logo","url","alt_text","background_color","text_color","exports","PidIssuerEntityConfiguration","jwks","keys","array","JWK","metadata","openid_credential_issuer","credential_issuer","authorization_endpoint","token_endpoint","pushed_authorization_request_endpoint","dpop_signing_alg_values_supported","credential_endpoint","credentials_supported","format","literal","cryptographic_binding_methods_supported","cryptographic_suites_supported","display","federation_entity","organization_name","homepage_uri","polic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BAAqB,EAAExB,MAAC,CAACC,MAAM,CAAC;QAC9B,iBAAiB,EAAED,MAAC,CAACC,MAAM,CAAC;UAC1BwB,MAAM,EAAEzB,MAAC,CAAC0B,OAAO,CAAC,WAAW,CAAC;UAC9BC,uCAAuC,EAAE3B,MAAC,CAACc,KAAK,CAACd,MAAC,CAACG,MAAM,CAAC,CAAC,CAAC;UAC5DyB,8BAA8B,EAAE5B,MAAC,CAACc,KAAK,CAACd,MAAC,CAACG,MAAM,CAAC,CAAC,CAAC;UACnD0B,OAAO,EAAE7B,MAAC,CAACc,KAAK,CAACf,kBAAkB;QACrC,CAAC;MACH,CAAC;IACH,CAAC,CAAC;IACF+B,iBAAiB,EAAE9B,MAAC,CAACC,MAAM,CAAC;MAC1B8B,iBAAiB,EAAE/B,MAAC,CAACG,MAAM,CAAC,CAAC;MAC7B6B,YAAY,EAAEhC,MAAC,CAACG,MAAM,CAAC,CAAC;MACxB8B,UAAU,EAAEjC,MAAC,CAACG,MAAM,CAAC,CAAC;MACtB+B,OAAO,EAAElC,MAAC,CAACG,MAAM,CAAC,CAAC;MACnBgC,QAAQ,EAAEnC,MAAC,CAACG,MAAM,CAAC;IACrB,CAAC;EACH,CAAC;AACH,CAAC,CAAC;AAACO,OAAA,CAAAC,4BAAA,GAAAA,4BAAA"}
|
@@ -33,8 +33,9 @@ var _types2 = require("./types");
|
|
33
33
|
function decode(token) {
|
34
34
|
let {
|
35
35
|
sdJwt,
|
36
|
-
disclosures
|
36
|
+
disclosures: disclosuresWithOriginal
|
37
37
|
} = (0, _sdJwt.decode)(token, _types.SdJwt4VC);
|
38
|
+
const disclosures = disclosuresWithOriginal.map(d => d.decoded);
|
38
39
|
const pid = (0, _converters.pidFromToken)(sdJwt, disclosures);
|
39
40
|
return {
|
40
41
|
pid,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_sdJwt","require","_converters","_types","_types2","decode","token","sdJwt","disclosures","decodeJwt","SdJwt4VC","pid","pidFromToken","verify","
|
1
|
+
{"version":3,"names":["_sdJwt","require","_converters","_types","_types2","decode","token","sdJwt","disclosures","disclosuresWithOriginal","decodeJwt","SdJwt4VC","map","d","decoded","pid","pidFromToken","verify","publicKey","payload","cnf","jwk","verifyJwt"],"sourceRoot":"../../../../src","sources":["pid/sd-jwt/index.ts"],"mappings":";;;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAsEA,IAAAG,OAAA,GAAAH,OAAA;AApEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASI,MAAMA,CAACC,KAAa,EAAgB;EAClD,IAAI;IAAEC,KAAK;IAAEC,WAAW,EAAEC;EAAwB,CAAC,GAAG,IAAAC,aAAS,EAC7DJ,KAAK,EACLK,eACF,CAAC;EACD,MAAMH,WAAW,GAAGC,uBAAuB,CAACG,GAAG,CAAEC,CAAC,IAAKA,CAAC,CAACC,OAAO,CAAC;EACjE,MAAMC,GAAG,GAAG,IAAAC,wBAAY,EAACT,KAAK,EAAEC,WAAW,CAAC;EAE5C,OAAO;IAAEO,GAAG;IAAER,KAAK;IAAEC;EAAY,CAAC;AACpC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,eAAeS,MAAMA,CAACX,KAAa,EAAyB;EACjE,MAAMQ,OAAO,GAAGT,MAAM,CAACC,KAAK,CAAC;EAC7B,MAAMY,SAAS,GAAGJ,OAAO,CAACP,KAAK,CAACY,OAAO,CAACC,GAAG,CAACC,GAAG;EAC/C,MAAM,IAAAC,aAAS,EAAChB,KAAK,EAAEY,SAAS,EAAEP,eAAQ,CAAC;EAE3C,OAAOG,OAAO;AAChB;;AAWA;AACA;AACA"}
|
@@ -2,17 +2,15 @@
|
|
2
2
|
|
3
3
|
var _ = require("..");
|
4
4
|
var _errors = require("../../utils/errors");
|
5
|
-
const walletInstanceAttestation = "eyJhbGciOiJFUzI1NiIsImtpZCI6IjV0NVlZcEJoTi1FZ0lFRUk1aVV6cjZyME1SMDJMblZRME9tZWttTktjalkiLCJ0cnVzdF9jaGFpbiI6WyJleUpoYkdjaU9pSkZVei4uLjZTMEEiLCJleUpoYkdjaU9pSkZVei4uLmpKTEEiLCJleUpoYkdjaU9pSkZVei4uLkg5Z3ciXSwidHlwIjoidmErand0IiwieDVjIjpbIk1JSUJqRENDIC4uLiBYRmVoZ0tRQT09Il19.eyJpc3MiOiJodHRwczovL3dhbGxldC1wcm92aWRlci5leGFtcGxlLm9yZyIsInN1YiI6InZiZVhKa3NNNDV4cGh0QU5uQ2lHNm1DeXVVNGpmR056b3BHdUt2b2dnOWMiLCJ0eXBlIjoiV2FsbGV0SW5zdGFuY2VBdHRlc3RhdGlvbiIsInBvbGljeV91cmkiOiJodHRwczovL3dhbGxldC1wcm92aWRlci5leGFtcGxlLm9yZy9wcml2YWN5X3BvbGljeSIsInRvc191cmkiOiJodHRwczovL3dhbGxldC1wcm92aWRlci5leGFtcGxlLm9yZy9pbmZvX3BvbGljeSIsImxvZ29fdXJpIjoiaHR0cHM6Ly93YWxsZXQtcHJvdmlkZXIuZXhhbXBsZS5vcmcvbG9nby5zdmciLCJhc2MiOiJodHRwczovL3dhbGxldC1wcm92aWRlci5leGFtcGxlLm9yZy9Mb0EvYmFzaWMiLCJjbmYiOnsiandrIjp7ImNydiI6IlAtMjU2Iiwia3R5IjoiRUMiLCJ4IjoiNEhOcHRJLXhyMnBqeVJKS0dNbno0V21kblFEX3VKU3E0Ujk1Tmo5OGI0NCIsInkiOiJMSVpuU0IzOXZGSmhZZ1MzazdqWEU0cjMtQ29HRlF3WnRQQklScXBObHJnIiwia2lkIjoidmJlWEprc000NXhwaHRBTm5DaUc2bUN5dVU0amZHTnpvcEd1S3ZvZ2c5YyJ9fSwiYXV0aG9yaXphdGlvbl9lbmRwb2ludCI6ImV1ZGl3OiIsInJlc3BvbnNlX3R5cGVzX3N1cHBvcnRlZCI6WyJ2cF90b2tlbiJdLCJ2cF9mb3JtYXRzX3N1cHBvcnRlZCI6eyJqd3RfdnBfanNvbiI6eyJhbGdfdmFsdWVzX3N1cHBvcnRlZCI6WyJFUzI1NiJdfSwiand0X3ZjX2pzb24iOnsiYWxnX3ZhbHVlc19zdXBwb3J0ZWQiOlsiRVMyNTYiXX19LCJyZXF1ZXN0X29iamVjdF9zaWduaW5nX2FsZ192YWx1ZXNfc3VwcG9ydGVkIjpbIkVTMjU2Il0sInByZXNlbnRhdGlvbl9kZWZpbml0aW9uX3VyaV9zdXBwb3J0ZWQiOmZhbHNlLCJpYXQiOjE2ODcyODExOTUsImV4cCI6MTY4NzI4ODM5NX0.OTuPik6p3o9j6VOx-uCyxRvHwoh1pDiiZcBQFNQt2uE3dK-8izGNflJVETi_uhGSZOf25Enkq-UvEin9NrbJNw";
|
6
|
-
const rp = new _.RelyingPartySolution("http://rp.example", walletInstanceAttestation);
|
7
5
|
describe("decodeAuthRequestQR", () => {
|
8
6
|
it("should return authentication request URL", async () => {
|
9
7
|
const qrcode = "ZXVkaXc6Ly9hdXRob3JpemU/Y2xpZW50X2lkPWh0dHBzOi8vdmVyaWZpZXIuZXhhbXBsZS5vcmcmcmVxdWVzdF91cmk9aHR0cHM6Ly92ZXJpZmllci5leGFtcGxlLm9yZy9yZXF1ZXN0X3VyaQ==";
|
10
|
-
const result =
|
11
|
-
expect(result).toEqual("https://verifier.example.org/request_uri");
|
8
|
+
const result = _.RelyingPartySolution.decodeAuthRequestQR(qrcode);
|
9
|
+
expect(result.requestURI).toEqual("https://verifier.example.org/request_uri");
|
12
10
|
});
|
13
11
|
it("should throw exception with invalid QR", async () => {
|
14
12
|
const qrcode = "aHR0cDovL2dvb2dsZS5pdA==";
|
15
|
-
expect(() =>
|
13
|
+
expect(() => _.RelyingPartySolution.decodeAuthRequestQR(qrcode)).toThrowError(_errors.AuthRequestDecodeError);
|
16
14
|
});
|
17
15
|
});
|
18
16
|
//# sourceMappingURL=index.test.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_","require","_errors","
|
1
|
+
{"version":3,"names":["_","require","_errors","describe","it","qrcode","result","RelyingPartySolution","decodeAuthRequestQR","expect","requestURI","toEqual","toThrowError","AuthRequestDecodeError"],"sourceRoot":"../../../../src","sources":["rp/__test__/index.test.ts"],"mappings":";;AAAA,IAAAA,CAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAEAE,QAAQ,CAAC,qBAAqB,EAAE,MAAM;EACpCC,EAAE,CAAC,0CAA0C,EAAE,YAAY;IACzD,MAAMC,MAAM,GACV,sJAAsJ;IACxJ,MAAMC,MAAM,GAAGC,sBAAoB,CAACC,mBAAmB,CAACH,MAAM,CAAC;IAC/DI,MAAM,CAACH,MAAM,CAACI,UAAU,CAAC,CAACC,OAAO,CAC/B,0CACF,CAAC;EACH,CAAC,CAAC;EACFP,EAAE,CAAC,wCAAwC,EAAE,YAAY;IACvD,MAAMC,MAAM,GAAG,0BAA0B;IACzCI,MAAM,CAAC,MAAMF,sBAAoB,CAACC,mBAAmB,CAACH,MAAM,CAAC,CAAC,CAACO,YAAY,CACzEC,8BACF,CAAC;EACH,CAAC,CAAC;AACJ,CAAC,CAAC"}
|
package/lib/commonjs/rp/index.js
CHANGED
@@ -8,6 +8,7 @@ var _errors = require("../utils/errors");
|
|
8
8
|
var _ioReactNativeJwt = require("@pagopa/io-react-native-jwt");
|
9
9
|
var _types = require("./types");
|
10
10
|
var _reactNativeUuid = _interopRequireDefault(require("react-native-uuid"));
|
11
|
+
var _sdJwt = require("../sd-jwt");
|
11
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
12
13
|
class RelyingPartySolution {
|
13
14
|
constructor(relyingPartyBaseUrl, walletInstanceAttestation) {
|
@@ -25,18 +26,23 @@ class RelyingPartySolution {
|
|
25
26
|
* @returns The authentication request url
|
26
27
|
*
|
27
28
|
*/
|
28
|
-
decodeAuthRequestQR(qrcode) {
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
29
|
+
static decodeAuthRequestQR(qrcode) {
|
30
|
+
const decoded = (0, _ioReactNativeJwt.decodeBase64)(qrcode);
|
31
|
+
const decodedUrl = new URL(decoded);
|
32
|
+
const protocol = decodedUrl.protocol;
|
33
|
+
const resource = decodedUrl.hostname;
|
34
|
+
const requestURI = decodedUrl.searchParams.get("request_uri");
|
35
|
+
const clientId = decodedUrl.searchParams.get("client_id");
|
36
|
+
const result = _types.QRCodePayload.safeParse({
|
37
|
+
protocol,
|
38
|
+
resource,
|
39
|
+
requestURI,
|
40
|
+
clientId
|
41
|
+
});
|
42
|
+
if (result.success) {
|
43
|
+
return result.data;
|
44
|
+
} else {
|
45
|
+
throw new _errors.AuthRequestDecodeError(result.error.message, `${decodedUrl}`);
|
40
46
|
}
|
41
47
|
}
|
42
48
|
/**
|
@@ -64,14 +70,16 @@ class RelyingPartySolution {
|
|
64
70
|
|
65
71
|
/**
|
66
72
|
* Obtain the Request Object for RP authentication
|
73
|
+
* @see https://italia.github.io/eudi-wallet-it-docs/versione-corrente/en/relying-party-solution.html
|
67
74
|
*
|
68
|
-
* @function
|
75
|
+
* @async @function
|
69
76
|
* @param signedWalletInstanceDPoP JWT of the Wallet Instance Attestation DPoP
|
70
77
|
*
|
71
78
|
* @returns The Request Object JWT
|
79
|
+
* @throws {NoSuitableKeysFoundInEntityConfiguration} When the Request Object is signed with a key not listed in RP's entity configuration
|
72
80
|
*
|
73
81
|
*/
|
74
|
-
async getRequestObject(signedWalletInstanceDPoP) {
|
82
|
+
async getRequestObject(signedWalletInstanceDPoP, entity) {
|
75
83
|
const decodedJwtDPop = await (0, _ioReactNativeJwt.decode)(signedWalletInstanceDPoP);
|
76
84
|
const requestUri = decodedJwtDPop.payload.htu;
|
77
85
|
const response = await this.appFetch(requestUri, {
|
@@ -83,7 +91,24 @@ class RelyingPartySolution {
|
|
83
91
|
});
|
84
92
|
if (response.status === 200) {
|
85
93
|
const responseText = await response.text();
|
86
|
-
const responseJwt =
|
94
|
+
const responseJwt = (0, _ioReactNativeJwt.decode)(responseText);
|
95
|
+
|
96
|
+
// verify token signature according to RP's entity configuration
|
97
|
+
// to ensure the request object is authentic
|
98
|
+
{
|
99
|
+
const pubKey = entity.payload.jwks.keys.find(_ref => {
|
100
|
+
let {
|
101
|
+
kid
|
102
|
+
} = _ref;
|
103
|
+
return kid === responseJwt.protectedHeader.kid;
|
104
|
+
});
|
105
|
+
if (!pubKey) {
|
106
|
+
throw new _errors.NoSuitableKeysFoundInEntityConfiguration("Request Object signature verification");
|
107
|
+
}
|
108
|
+
await (0, _ioReactNativeJwt.verify)(responseText, pubKey);
|
109
|
+
}
|
110
|
+
|
111
|
+
// parse request object it has the expected shape by specification
|
87
112
|
const requestObj = _types.RequestObject.parse({
|
88
113
|
header: responseJwt.protectedHeader,
|
89
114
|
payload: responseJwt.payload
|
@@ -93,6 +118,131 @@ class RelyingPartySolution {
|
|
93
118
|
throw new _errors.IoWalletError(`Unable to obtain Request Object. Response code: ${response.status}`);
|
94
119
|
}
|
95
120
|
|
121
|
+
/**
|
122
|
+
* Prepare the Verified Presentation token for a received request object in the context of an authorization request flow.
|
123
|
+
* The presentation is prepared by disclosing data from provided credentials, according to requested claims
|
124
|
+
* Each Verified Credential come along with the claims the user accepts to disclose from it.
|
125
|
+
*
|
126
|
+
* The returned token is unsigned (sign should be apply by the caller).
|
127
|
+
*
|
128
|
+
* @todo accept more than a Verified Credential
|
129
|
+
*
|
130
|
+
* @param requestObj The incoming request object, which the requirements for the requested authorization
|
131
|
+
* @param presentation The Verified Credential containing user data along with the list of claims to be disclosed.
|
132
|
+
* @returns The unsigned Verified Presentation token
|
133
|
+
* @throws {ClaimsNotFoundBetweenDislosures} If the Verified Credential does not contain one or more requested claims.
|
134
|
+
*
|
135
|
+
*/
|
136
|
+
async prepareVpToken(requestObj, _ref2) {
|
137
|
+
let [vc, claims] = _ref2;
|
138
|
+
// this throws if vc cannot satisfy all the requested claims
|
139
|
+
const {
|
140
|
+
token: vp,
|
141
|
+
paths
|
142
|
+
} = await (0, _sdJwt.disclose)(vc, claims);
|
143
|
+
|
144
|
+
// TODO: [SIW-359] check all requeste claims of the requestedObj are satisfied
|
145
|
+
|
146
|
+
const vp_token = new _ioReactNativeJwt.SignJWT({
|
147
|
+
vp
|
148
|
+
}).setAudience(requestObj.payload.response_uri).setExpirationTime("1h").setProtectedHeader({
|
149
|
+
typ: "JWT",
|
150
|
+
alg: "ES256"
|
151
|
+
}).toSign();
|
152
|
+
const [definition_id, vc_scope] = requestObj.payload.scope;
|
153
|
+
const presentation_submission = {
|
154
|
+
definition_id,
|
155
|
+
id: `${_reactNativeUuid.default.v4()}`,
|
156
|
+
descriptor_map: paths.map(p => ({
|
157
|
+
id: vc_scope,
|
158
|
+
path: `$.vp_token.${p.path}`,
|
159
|
+
format: "vc+sd-jwt"
|
160
|
+
}))
|
161
|
+
};
|
162
|
+
return {
|
163
|
+
vp_token,
|
164
|
+
presentation_submission
|
165
|
+
};
|
166
|
+
}
|
167
|
+
|
168
|
+
/**
|
169
|
+
* Compose and send an Authorization Response in the context of an authorization request flow.
|
170
|
+
*
|
171
|
+
* @todo MUST add presentation_submission
|
172
|
+
*
|
173
|
+
* @param requestObj The incoming request object, which the requirements for the requested authorization
|
174
|
+
* @param vp_token The signed Verified Presentation token with data to send.
|
175
|
+
* @param presentation_submission
|
176
|
+
* @param entity The RP entity configuration
|
177
|
+
* @returns The response from the RP
|
178
|
+
* @throws {IoWalletError} if the submission fails.
|
179
|
+
* @throws {NoSuitableKeysFoundInEntityConfiguration} If entity do not contain any public key
|
180
|
+
*
|
181
|
+
*/
|
182
|
+
async sendAuthorizationResponse(requestObj, vp_token, presentation_submission, entity) {
|
183
|
+
// the request is an unsigned jws without iss, aud, exp
|
184
|
+
// https://openid.net/specs/openid-4-verifiable-presentations-1_0.html#name-signed-and-encrypted-respon
|
185
|
+
const jwk = this.choosePublicKeyToEncrypt(entity);
|
186
|
+
const enc = this.getEncryptionAlgByJwk(jwk);
|
187
|
+
const authzResponsePayload = JSON.stringify({
|
188
|
+
state: requestObj.payload.state,
|
189
|
+
presentation_submission,
|
190
|
+
vp_token
|
191
|
+
});
|
192
|
+
const encrypted = await new _ioReactNativeJwt.EncryptJwe(authzResponsePayload, {
|
193
|
+
alg: jwk.alg,
|
194
|
+
enc
|
195
|
+
}).encrypt(jwk);
|
196
|
+
const formBody = new URLSearchParams({
|
197
|
+
response: encrypted
|
198
|
+
});
|
199
|
+
const response = await this.appFetch(requestObj.payload.response_uri, {
|
200
|
+
method: "POST",
|
201
|
+
headers: {
|
202
|
+
"Content-Type": "application/x-www-form-urlencoded"
|
203
|
+
},
|
204
|
+
body: formBody.toString()
|
205
|
+
});
|
206
|
+
if (response.status === 200) {
|
207
|
+
return response.text();
|
208
|
+
}
|
209
|
+
throw new _errors.IoWalletError(`Unable to send Authorization Response. Response code: ${response.status}`);
|
210
|
+
}
|
211
|
+
|
212
|
+
/**
|
213
|
+
* Select a public key from those provided by the RP.
|
214
|
+
* Keys with algorithm "RSA-OAEP-256" or "RSA-OAEP" are expected, the firsts to be preferred.
|
215
|
+
*
|
216
|
+
* @param entity The RP entity configuration
|
217
|
+
* @returns A suitable public key with its compatible encryption algorithm
|
218
|
+
* @throws {NoSuitableKeysFoundInEntityConfiguration} If entity do not contain any public key suitable for encrypting
|
219
|
+
*/
|
220
|
+
choosePublicKeyToEncrypt(entity) {
|
221
|
+
// Look for keys using "RSA-OAEP-256", and pick a random one
|
222
|
+
const [usingRsa256] = entity.payload.jwks.keys.filter(k => typeof k.alg === "string" && k.alg === "RSA-OAEP-256");
|
223
|
+
if (usingRsa256) {
|
224
|
+
return usingRsa256;
|
225
|
+
}
|
226
|
+
|
227
|
+
// Look for keys using "RSA-OAEP", and pick a random one
|
228
|
+
const [usingRsa] = entity.payload.jwks.keys.filter(k => typeof k.alg === "string" && k.alg === "RSA-OAEP");
|
229
|
+
if (usingRsa) {
|
230
|
+
return usingRsa;
|
231
|
+
}
|
232
|
+
|
233
|
+
// No suitable key has been found
|
234
|
+
throw new _errors.NoSuitableKeysFoundInEntityConfiguration("Encrypt with RP public key");
|
235
|
+
}
|
236
|
+
getEncryptionAlgByJwk(_ref3) {
|
237
|
+
let {
|
238
|
+
alg
|
239
|
+
} = _ref3;
|
240
|
+
if (alg === "RSA-OAEP-256") return "A256CBC-HS512";
|
241
|
+
if (alg === "RSA-OAEP") return "A128CBC-HS256";
|
242
|
+
const _ = alg;
|
243
|
+
throw new Error(`Invalid jwk algorithm: ${_}`);
|
244
|
+
}
|
245
|
+
|
96
246
|
/**
|
97
247
|
* Obtain the relying party entity configuration.
|
98
248
|
*/
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_errors","require","_ioReactNativeJwt","_types","_reactNativeUuid","_interopRequireDefault","obj","__esModule","default","RelyingPartySolution","constructor","relyingPartyBaseUrl","walletInstanceAttestation","appFetch","arguments","length","undefined","fetch","decodeAuthRequestQR","qrcode","decoded","decodeBase64","decodedUrl","URL","
|
1
|
+
{"version":3,"names":["_errors","require","_ioReactNativeJwt","_types","_reactNativeUuid","_interopRequireDefault","_sdJwt","obj","__esModule","default","RelyingPartySolution","constructor","relyingPartyBaseUrl","walletInstanceAttestation","appFetch","arguments","length","undefined","fetch","decodeAuthRequestQR","qrcode","decoded","decodeBase64","decodedUrl","URL","protocol","resource","hostname","requestURI","searchParams","get","clientId","result","QRCodePayload","safeParse","success","data","AuthRequestDecodeError","error","message","getUnsignedWalletInstanceDPoP","walletInstanceAttestationJwk","authRequestUrl","SignJWT","jti","uuid","v4","htm","htu","ath","sha256ToBase64","setProtectedHeader","alg","jwk","typ","setIssuedAt","setExpirationTime","toSign","getRequestObject","signedWalletInstanceDPoP","entity","decodedJwtDPop","decodeJwt","requestUri","payload","response","method","headers","Authorization","DPoP","status","responseText","text","responseJwt","pubKey","jwks","keys","find","_ref","kid","protectedHeader","NoSuitableKeysFoundInEntityConfiguration","verify","requestObj","RequestObject","parse","header","IoWalletError","prepareVpToken","_ref2","vc","claims","token","vp","paths","disclose","vp_token","setAudience","response_uri","definition_id","vc_scope","scope","presentation_submission","id","descriptor_map","map","p","path","format","sendAuthorizationResponse","choosePublicKeyToEncrypt","enc","getEncryptionAlgByJwk","authzResponsePayload","JSON","stringify","state","encrypted","EncryptJwe","encrypt","formBody","URLSearchParams","body","toString","usingRsa256","filter","k","usingRsa","_ref3","_","Error","getEntityConfiguration","wellKnownUrl","href","RpEntityConfiguration","exports"],"sourceRoot":"../../../src","sources":["rp/index.ts"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAKA,IAAAC,iBAAA,GAAAD,OAAA;AAQA,IAAAE,MAAA,GAAAF,OAAA;AAOA,IAAAG,gBAAA,GAAAC,sBAAA,CAAAJ,OAAA;AAEA,IAAAK,MAAA,GAAAL,OAAA;AAAqC,SAAAI,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAE9B,MAAMG,oBAAoB,CAAC;EAKhCC,WAAWA,CACTC,mBAA2B,EAC3BC,yBAAiC,EAEjC;IAAA,IADAC,QAA8B,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAGG,KAAK;IAEtC,IAAI,CAACN,mBAAmB,GAAGA,mBAAmB;IAC9C,IAAI,CAACC,yBAAyB,GAAGA,yBAAyB;IAC1D,IAAI,CAACC,QAAQ,GAAGA,QAAQ;EAC1B;;EAEA;AACF;AACA;AACA;AACA;AACA;AACA;AACA;EACE,OAAOK,mBAAmBA,CAACC,MAAc,EAAiB;IACxD,MAAMC,OAAO,GAAG,IAAAC,8BAAY,EAACF,MAAM,CAAC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C9E,CAAC;EACH;AACF;AAACiE,OAAA,CAAA7H,oBAAA,GAAAA,oBAAA"}
|
package/lib/commonjs/rp/types.js
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.RpEntityConfiguration = exports.RequestObject = void 0;
|
6
|
+
exports.RpEntityConfiguration = exports.RequestObject = exports.QRCodePayload = void 0;
|
7
7
|
var _jwk = require("../utils/jwk");
|
8
8
|
var _types = require("../sd-jwt/types");
|
9
9
|
var z = _interopRequireWildcard(require("zod"));
|
@@ -69,4 +69,16 @@ const RpEntityConfiguration = z.object({
|
|
69
69
|
})
|
70
70
|
});
|
71
71
|
exports.RpEntityConfiguration = RpEntityConfiguration;
|
72
|
+
const QRCodePayload = z.object({
|
73
|
+
protocol: z.literal("eudiw:"),
|
74
|
+
resource: z.string(),
|
75
|
+
// TODO: refine to known paths using literals
|
76
|
+
clientId: z.string(),
|
77
|
+
requestURI: z.string()
|
78
|
+
});
|
79
|
+
|
80
|
+
/**
|
81
|
+
* A pair that associate a tokenized Verified Credential with the claims presented or requested to present.
|
82
|
+
*/
|
83
|
+
exports.QRCodePayload = QRCodePayload;
|
72
84
|
//# sourceMappingURL=types.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_jwk","require","_types","z","_interopRequireWildcard","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","RequestObject","object","header","typ","literal","alg","string","kid","trust_chain","array","payload","iss","iat","UnixTime","exp","state","nonce","response_uri","response_type","response_mode","client_id","client_id_scheme","scope","exports","RpEntityConfiguration","sub","jwks","keys","JWK","metadata","wallet_relying_party","application_type","client_name","contacts","federation_entity","organization_name","homepage_uri","policy_uri","logo_uri","authority_hints"],"sourceRoot":"../../../src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CAAC,CAAC8B,MAAM,CAAC,CAAC;MAC9B,CAAC;IACH,CAAC,CAAC;IACFiC,eAAe,EAAE/D,CAAC,CAACiC,KAAK,CAACjC,CAAC,CAAC8B,MAAM,CAAC,CAAC;EACrC,CAAC;AACH,CAAC,CAAC;AAACiB,OAAA,CAAAC,qBAAA,GAAAA,qBAAA"}
|
1
|
+
{"version":3,"names":["_jwk","require","_types","z","_interopRequireWildcard","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","RequestObject","object","header","typ","literal","alg","string","kid","trust_chain","array","payload","iss","iat","UnixTime","exp","state","nonce","response_uri","response_type","response_mode","client_id","client_id_scheme","scope","exports","RpEntityConfiguration","sub","jwks","keys","JWK","metadata","wallet_relying_party","application_type","client_name","contacts","federation_entity","organization_name","homepage_uri","policy_uri","logo_uri","authority_hints","QRCodePayload","protocol","resource","clientId","requestURI"],"sourceRoot":"../../../src","sources":["rp/types.ts"],"mappings":";;;;;;AAAA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,CAAA,GAAAC,uBAAA,CAAAH,OAAA;AAAyB,SAAAI,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,SAAAF,wBAAAM,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,IA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