@pagopa/io-react-native-wallet 0.11.0 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/commonjs/client/generated/wallet-provider.js +126 -0
- package/lib/commonjs/client/generated/wallet-provider.js.map +1 -0
- package/lib/commonjs/client/index.js +41 -0
- package/lib/commonjs/client/index.js.map +1 -0
- package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js +6 -6
- package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js.map +1 -1
- package/lib/commonjs/index.js +10 -1
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/utils/errors.js +29 -1
- package/lib/commonjs/utils/errors.js.map +1 -1
- package/lib/commonjs/utils/integrity.js +2 -0
- package/lib/commonjs/utils/integrity.js.map +1 -0
- package/lib/commonjs/wallet-instance/index.js +29 -0
- package/lib/commonjs/wallet-instance/index.js.map +1 -0
- package/lib/commonjs/wallet-instance-attestation/issuing.js +48 -66
- package/lib/commonjs/wallet-instance-attestation/issuing.js.map +1 -1
- package/lib/commonjs/wallet-instance-attestation/types.js +1 -1
- package/lib/commonjs/wallet-instance-attestation/types.js.map +1 -1
- package/lib/module/client/generated/wallet-provider.js +105 -0
- package/lib/module/client/generated/wallet-provider.js.map +1 -0
- package/lib/module/client/index.js +34 -0
- package/lib/module/client/index.js.map +1 -0
- package/lib/module/credential/issuance/07-verify-and-parse-credential.js +6 -6
- package/lib/module/credential/issuance/07-verify-and-parse-credential.js.map +1 -1
- package/lib/module/index.js +3 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/sd-jwt/verifier.js.map +1 -1
- package/lib/module/utils/errors.js +27 -0
- package/lib/module/utils/errors.js.map +1 -1
- package/lib/module/utils/integrity.js +2 -0
- package/lib/module/utils/integrity.js.map +1 -0
- package/lib/module/wallet-instance/index.js +23 -0
- package/lib/module/wallet-instance/index.js.map +1 -0
- package/lib/module/wallet-instance-attestation/issuing.js +48 -67
- package/lib/module/wallet-instance-attestation/issuing.js.map +1 -1
- package/lib/module/wallet-instance-attestation/types.js +1 -1
- package/lib/module/wallet-instance-attestation/types.js.map +1 -1
- package/lib/typescript/client/generated/wallet-provider.d.ts +242 -0
- package/lib/typescript/client/generated/wallet-provider.d.ts.map +1 -0
- package/lib/typescript/client/index.d.ts +7 -0
- package/lib/typescript/client/index.d.ts.map +1 -0
- package/lib/typescript/credential/issuance/07-verify-and-parse-credential.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +5 -1
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/utils/errors.d.ts +13 -0
- package/lib/typescript/utils/errors.d.ts.map +1 -1
- package/lib/typescript/utils/integrity.d.ts +21 -0
- package/lib/typescript/utils/integrity.d.ts.map +1 -0
- package/lib/typescript/wallet-instance/index.d.ts +7 -0
- package/lib/typescript/wallet-instance/index.d.ts.map +1 -0
- package/lib/typescript/wallet-instance-attestation/issuing.d.ts +15 -3
- package/lib/typescript/wallet-instance-attestation/issuing.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/types.d.ts +5 -5
- package/package.json +9 -6
- package/src/client/generated/wallet-provider.ts +170 -0
- package/src/client/index.ts +58 -0
- package/src/credential/issuance/07-verify-and-parse-credential.ts +38 -34
- package/src/index.ts +7 -0
- package/src/sd-jwt/__test__/converters.test.js +24 -0
- package/src/sd-jwt/verifier.js +12 -0
- package/src/utils/errors.ts +28 -0
- package/src/utils/integrity.ts +23 -0
- package/src/wallet-instance/index.ts +29 -0
- package/src/wallet-instance-attestation/issuing.ts +68 -101
- package/src/wallet-instance-attestation/types.ts +1 -1
@@ -0,0 +1,126 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.ProblemDetail = exports.Id = exports.FiscalCode = exports.EndpointByMethod = exports.ApiClient = void 0;
|
7
|
+
exports.createApiClient = createApiClient;
|
8
|
+
exports.post_CreateWalletInstance = exports.post_CreateWalletAttestation = exports.get_GetNonce = exports.get_GetEntityConfiguration = void 0;
|
9
|
+
var _zod = _interopRequireDefault(require("zod"));
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11
|
+
const ProblemDetail = _zod.default.object({
|
12
|
+
type: _zod.default.string().optional(),
|
13
|
+
title: _zod.default.string().optional(),
|
14
|
+
status: _zod.default.number().optional(),
|
15
|
+
detail: _zod.default.string().optional(),
|
16
|
+
instance: _zod.default.string().optional()
|
17
|
+
});
|
18
|
+
exports.ProblemDetail = ProblemDetail;
|
19
|
+
const FiscalCode = _zod.default.string();
|
20
|
+
exports.FiscalCode = FiscalCode;
|
21
|
+
const Id = _zod.default.string();
|
22
|
+
exports.Id = Id;
|
23
|
+
const get_GetEntityConfiguration = {
|
24
|
+
method: _zod.default.literal("GET"),
|
25
|
+
path: _zod.default.literal("/.well-known/openid-federation"),
|
26
|
+
parameters: _zod.default.never(),
|
27
|
+
response: _zod.default.unknown()
|
28
|
+
};
|
29
|
+
exports.get_GetEntityConfiguration = get_GetEntityConfiguration;
|
30
|
+
const get_GetNonce = {
|
31
|
+
method: _zod.default.literal("GET"),
|
32
|
+
path: _zod.default.literal("/nonce"),
|
33
|
+
parameters: _zod.default.never(),
|
34
|
+
response: _zod.default.object({
|
35
|
+
nonce: _zod.default.string()
|
36
|
+
})
|
37
|
+
};
|
38
|
+
exports.get_GetNonce = get_GetNonce;
|
39
|
+
const post_CreateWalletInstance = {
|
40
|
+
method: _zod.default.literal("POST"),
|
41
|
+
path: _zod.default.literal("/wallet-instances"),
|
42
|
+
parameters: _zod.default.object({
|
43
|
+
body: _zod.default.object({
|
44
|
+
challenge: _zod.default.string(),
|
45
|
+
key_attestation: _zod.default.string(),
|
46
|
+
hardware_key_tag: _zod.default.string()
|
47
|
+
})
|
48
|
+
}),
|
49
|
+
response: _zod.default.unknown()
|
50
|
+
};
|
51
|
+
exports.post_CreateWalletInstance = post_CreateWalletInstance;
|
52
|
+
const post_CreateWalletAttestation = {
|
53
|
+
method: _zod.default.literal("POST"),
|
54
|
+
path: _zod.default.literal("/token"),
|
55
|
+
parameters: _zod.default.object({
|
56
|
+
body: _zod.default.object({
|
57
|
+
grant_type: _zod.default.literal("urn:ietf:params:oauth:grant-type:jwt-bearer"),
|
58
|
+
assertion: _zod.default.string()
|
59
|
+
})
|
60
|
+
}),
|
61
|
+
response: _zod.default.unknown()
|
62
|
+
};
|
63
|
+
|
64
|
+
// <EndpointByMethod>
|
65
|
+
exports.post_CreateWalletAttestation = post_CreateWalletAttestation;
|
66
|
+
const EndpointByMethod = {
|
67
|
+
get: {
|
68
|
+
"/.well-known/openid-federation": get_GetEntityConfiguration,
|
69
|
+
"/nonce": get_GetNonce
|
70
|
+
},
|
71
|
+
post: {
|
72
|
+
"/wallet-instances": post_CreateWalletInstance,
|
73
|
+
"/token": post_CreateWalletAttestation
|
74
|
+
}
|
75
|
+
};
|
76
|
+
|
77
|
+
// </EndpointByMethod>
|
78
|
+
|
79
|
+
// <EndpointByMethod.Shorthands>
|
80
|
+
|
81
|
+
// </EndpointByMethod.Shorthands>
|
82
|
+
|
83
|
+
// <ApiClientTypes>
|
84
|
+
exports.EndpointByMethod = EndpointByMethod;
|
85
|
+
// </ApiClientTypes>
|
86
|
+
|
87
|
+
// <ApiClient>
|
88
|
+
class ApiClient {
|
89
|
+
baseUrl = "";
|
90
|
+
constructor(fetcher) {
|
91
|
+
this.fetcher = fetcher;
|
92
|
+
}
|
93
|
+
setBaseUrl(baseUrl) {
|
94
|
+
this.baseUrl = baseUrl;
|
95
|
+
return this;
|
96
|
+
}
|
97
|
+
|
98
|
+
// <ApiClient.get>
|
99
|
+
get(path) {
|
100
|
+
return this.fetcher("get", this.baseUrl + path, arguments.length <= 1 ? undefined : arguments[1]);
|
101
|
+
}
|
102
|
+
// </ApiClient.get>
|
103
|
+
|
104
|
+
// <ApiClient.post>
|
105
|
+
post(path) {
|
106
|
+
return this.fetcher("post", this.baseUrl + path, arguments.length <= 1 ? undefined : arguments[1]);
|
107
|
+
}
|
108
|
+
// </ApiClient.post>
|
109
|
+
}
|
110
|
+
exports.ApiClient = ApiClient;
|
111
|
+
function createApiClient(fetcher, baseUrl) {
|
112
|
+
return new ApiClient(fetcher).setBaseUrl(baseUrl ?? "");
|
113
|
+
}
|
114
|
+
|
115
|
+
/**
|
116
|
+
Example usage:
|
117
|
+
const api = createApiClient((method, url, params) =>
|
118
|
+
fetch(url, { method, body: JSON.stringify(params) }).then((res) => res.json()),
|
119
|
+
);
|
120
|
+
api.get("/users").then((users) => console.log(users));
|
121
|
+
api.post("/users", { body: { name: "John" } }).then((user) => console.log(user));
|
122
|
+
api.put("/users/:id", { path: { id: 1 }, body: { name: "John" } }).then((user) => console.log(user));
|
123
|
+
*/
|
124
|
+
|
125
|
+
// </ApiClient
|
126
|
+
//# sourceMappingURL=wallet-provider.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["_zod","_interopRequireDefault","require","obj","__esModule","default","ProblemDetail","z","object","type","string","optional","title","status","number","detail","instance","exports","FiscalCode","Id","get_GetEntityConfiguration","method","literal","path","parameters","never","response","unknown","get_GetNonce","nonce","post_CreateWalletInstance","body","challenge","key_attestation","hardware_key_tag","post_CreateWalletAttestation","grant_type","assertion","EndpointByMethod","get","post","ApiClient","baseUrl","constructor","fetcher","setBaseUrl","arguments","length","undefined","createApiClient"],"sourceRoot":"../../../../src","sources":["client/generated/wallet-provider.ts"],"mappings":";;;;;;;;AAAA,IAAAA,IAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAoB,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAGb,MAAMG,aAAa,GAAGC,YAAC,CAACC,MAAM,CAAC;EACpCC,IAAI,EAAEF,YAAC,CAACG,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EAC3BC,KAAK,EAAEL,YAAC,CAACG,MAAM,CAAC,CAAC,CAACC,QAAQ,C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,EAAE;EAEpBC,WAAWA,CAAQC,OAAgB,EAAE;IAAA,KAAlBA,OAAgB,GAAhBA,OAAgB;EAAG;EAEtCC,UAAUA,CAACH,OAAe,EAAE;IAC1B,IAAI,CAACA,OAAO,GAAGA,OAAO;IACtB,OAAO,IAAI;EACb;;EAEA;EACAH,GAAGA,CACDhB,IAAU,EAE+B;IACzC,OAAO,IAAI,CAACqB,OAAO,CAAC,KAAK,EAAE,IAAI,CAACF,OAAO,GAAGnB,IAAI,EAAAuB,SAAA,CAAAC,MAAA,QAAAC,SAAA,GAAAF,SAAA,GAAW,CAAC;EAC5D;EACA;;EAEA;EACAN,IAAIA,CACFjB,IAAU,EAE+B;IACzC,OAAO,IAAI,CAACqB,OAAO,CAAC,MAAM,EAAE,IAAI,CAACF,OAAO,GAAGnB,IAAI,EAAAuB,SAAA,CAAAC,MAAA,QAAAC,SAAA,GAAAF,SAAA,GAAW,CAAC;EAC7D;EACA;AACF;AAAC7B,OAAA,CAAAwB,SAAA,GAAAA,SAAA;AAEM,SAASQ,eAAeA,CAACL,OAAgB,EAAEF,OAAgB,EAAE;EAClE,OAAO,IAAID,SAAS,CAACG,OAAO,CAAC,CAACC,UAAU,CAACH,OAAO,IAAI,EAAE,CAAC;AACzD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA"}
|
@@ -0,0 +1,41 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.getWalletProviderClient = void 0;
|
7
|
+
var _errors = require("../utils/errors");
|
8
|
+
var _walletProvider = require("./generated/wallet-provider");
|
9
|
+
const validateResponse = async response => {
|
10
|
+
if (!response.ok) {
|
11
|
+
let problemDetail = {};
|
12
|
+
try {
|
13
|
+
problemDetail = _walletProvider.ProblemDetail.parse(await response.json());
|
14
|
+
} catch {
|
15
|
+
problemDetail = {
|
16
|
+
title: "Invalid response from Wallet Provider"
|
17
|
+
};
|
18
|
+
}
|
19
|
+
let statusResponse = `Response status code: ${response.status}`;
|
20
|
+
throw new _errors.WalletProviderResponseError(problemDetail.title ? problemDetail.title : "Invalid response from Wallet Provider", problemDetail.type, problemDetail.detail ? statusResponse : `${statusResponse} with detail: ${problemDetail.detail}`);
|
21
|
+
}
|
22
|
+
return response;
|
23
|
+
};
|
24
|
+
const getWalletProviderClient = context => {
|
25
|
+
const {
|
26
|
+
walletProviderBaseUrl,
|
27
|
+
appFetch = fetch
|
28
|
+
} = context;
|
29
|
+
return (0, _walletProvider.createApiClient)((method, url, params) => appFetch(url, {
|
30
|
+
method,
|
31
|
+
body: params ? JSON.stringify(params.body) : undefined
|
32
|
+
}).then(validateResponse).then(res => {
|
33
|
+
const contentType = res.headers.get("content-type");
|
34
|
+
if (contentType === "application/json") {
|
35
|
+
return res.json();
|
36
|
+
}
|
37
|
+
return res.text();
|
38
|
+
}), walletProviderBaseUrl);
|
39
|
+
};
|
40
|
+
exports.getWalletProviderClient = getWalletProviderClient;
|
41
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["_errors","require","_walletProvider","validateResponse","response","ok","problemDetail","ProblemDetail","parse","json","title","statusResponse","status","WalletProviderResponseError","type","detail","getWalletProviderClient","context","walletProviderBaseUrl","appFetch","fetch","createWalletProviderApiClient","method","url","params","body","JSON","stringify","undefined","then","res","contentType","headers","get","text","exports"],"sourceRoot":"../../../src","sources":["client/index.ts"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AAQA,MAAME,gBAAgB,GAAG,MAAOC,QAAkB,IAAK;EACrD,IAAI,CAACA,QAAQ,CAACC,EAAE,EAAE;IAChB,IAAIC,aAA4B,GAAG,CAAC,CAAC;IACrC,IAAI;MACFA,aAAa,GAAGC,6BAAa,CAACC,KAAK,CAAC,MAAMJ,QAAQ,CAACK,IAAI,CAAC,CAAC,CAAC;IAC5D,CAAC,CAAC,MAAM;MACNH,aAAa,GAAG;QACdI,KAAK,EAAE;MACT,CAAC;IACH;IAEA,IAAIC,cAAc,GAAI,yBAAwBP,QAAQ,CAACQ,MAAO,EAAC;IAE/D,MAAM,IAAIC,mCAA2B,CACnCP,aAAa,CAACI,KAAK,GACfJ,aAAa,CAACI,KAAK,GACnB,uCAAuC,EAC3CJ,aAAa,CAACQ,IAAI,EAClBR,aAAa,CAACS,MAAM,GAChBJ,cAAc,GACb,GAAEA,cAAe,iBAAgBL,aAAa,CAACS,MAAO,EAC7D,CAAC;EACH;EACA,OAAOX,QAAQ;AACjB,CAAC;AAEM,MAAMY,uBAAuB,GAAIC,OAGvC,IAAK;EACJ,MAAM;IAAEC,qBAAqB;IAAEC,QAAQ,GAAGC;EAAM,CAAC,GAAGH,OAAO;EAE3D,OAAO,IAAAI,+BAA6B,EAClC,CAACC,MAAM,EAAEC,GAAG,EAAEC,MAAM,KAClBL,QAAQ,CAACI,GAAG,EAAE;IACZD,MAAM;IACNG,IAAI,EAAED,MAAM,GAAGE,IAAI,CAACC,SAAS,CAACH,MAAM,CAACC,IAAI,CAAC,GAAGG;EAC/C,CAAC,CAAC,CACCC,IAAI,CAAC1B,gBAAgB,CAAC,CACtB0B,IAAI,CAAEC,GAAG,IAAK;IACb,MAAMC,WAAW,GAAGD,GAAG,CAACE,OAAO,CAACC,GAAG,CAAC,cAAc,CAAC;IACnD,IAAIF,WAAW,KAAK,kBAAkB,EAAE;MACtC,OAAOD,GAAG,CAACrB,IAAI,CAAC,CAAC;IACnB;IACA,OAAOqB,GAAG,CAACI,IAAI,CAAC,CAAC;EACnB,CAAC,CAAC,EACNhB,qBACF,CAAC;AACH,CAAC;AAACiB,OAAA,CAAAnB,uBAAA,GAAAA,uBAAA"}
|
@@ -55,7 +55,7 @@ const parseCredentialSdJwt = function (credentials_supported, _ref) {
|
|
55
55
|
|
56
56
|
// attributes that are defined in the issuer configuration
|
57
57
|
// and are present in the disclosure set
|
58
|
-
const definedValues = attrDefinitions
|
58
|
+
const definedValues = Object.fromEntries(attrDefinitions
|
59
59
|
// retrieve the value from the disclosure set
|
60
60
|
.map(_ref4 => {
|
61
61
|
var _disclosures$find;
|
@@ -85,21 +85,21 @@ const parseCredentialSdJwt = function (credentials_supported, _ref) {
|
|
85
85
|
};
|
86
86
|
}, {})
|
87
87
|
}];
|
88
|
-
});
|
88
|
+
}));
|
89
89
|
|
90
90
|
// attributes that are in the disclosure set
|
91
91
|
// but are not defined in the issuer configuration
|
92
|
-
const undefinedValues = disclosures.filter(_ => !Object.keys(definedValues).includes(_[1])).map(_ref7 => {
|
92
|
+
const undefinedValues = Object.fromEntries(disclosures.filter(_ => !Object.keys(definedValues).includes(_[1])).map(_ref7 => {
|
93
93
|
let [, key, value] = _ref7;
|
94
94
|
return [key, {
|
95
95
|
value,
|
96
96
|
mandatory: false,
|
97
97
|
name: key
|
98
98
|
}];
|
99
|
-
});
|
99
|
+
}));
|
100
100
|
return {
|
101
|
-
...
|
102
|
-
...
|
101
|
+
...definedValues,
|
102
|
+
...undefinedValues
|
103
103
|
};
|
104
104
|
};
|
105
105
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_errors","require","_types","_sdJwt","parseCredentialSdJwt","credentials_supported","_ref","_credentials_supporte","sdJwt","disclosures","ignoreMissingAttributes","arguments","length","undefined","credentialSubject","find","c","format","credential_definition","type","includes","payload","expected","flatMap","_","join","IoWalletError","attrDefinitions","Object","entries","attrsNotInDisclosures","filter","_ref2","attrKey","mandatory","some","_ref3","name","missing","map","received","definedValues","_ref4","_disclosures$find","definition","value","_ref5","display","reduce","names","_ref6","locale","undefinedValues","keys","_ref7","key","
|
1
|
+
{"version":3,"names":["_errors","require","_types","_sdJwt","parseCredentialSdJwt","credentials_supported","_ref","_credentials_supporte","sdJwt","disclosures","ignoreMissingAttributes","arguments","length","undefined","credentialSubject","find","c","format","credential_definition","type","includes","payload","expected","flatMap","_","join","IoWalletError","attrDefinitions","Object","entries","attrsNotInDisclosures","filter","_ref2","attrKey","mandatory","some","_ref3","name","missing","map","received","definedValues","fromEntries","_ref4","_disclosures$find","definition","value","_ref5","display","reduce","names","_ref6","locale","undefinedValues","keys","_ref7","key","verifyCredentialSdJwt","rawCredential","issuerKeys","holderBindingContext","decodedCredential","holderBindingKey","Promise","all","verifySdJwt","SdJwt4VC","getPublicKey","cnf","jwk","kid","verifyAndParseCredentialSdJwt","issuerConf","credential","_ref8","credentialCryptoContext","decoded","openid_credential_issuer","jwks","parsedCredential","verifyAndParseCredentialMdoc","_issuerConf","_credential","_ctx","Error","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;;AAmBA;;AAKA,MAAMG,oBAAoB,GAAG,SAAAA,CAE3BC,qBAAkH,EAAAC,IAAA,EAG7F;EAAA,IAAAC,qBAAA;EAAA,IAFrB;IAAEC,KAAK;IAAEC;EAAoC,CAAC,GAAAH,IAAA;EAAA,IAC9CI,uBAAgC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,KAAK;EAExC;EACA;EACA,MAAMG,iBAAiB,IAAAP,qBAAA,GAAGF,qBAAqB,CAACU,IAAI,CACjDC,CAAC,IACAA,CAAC,CAACC,MAAM,KAAK,WAAW,IACxBD,CAAC,CAACE,qBAAqB,CAACC,IAAI,CAACC,QAAQ,CAACZ,KAAK,CAACa,OAAO,CAACF,IAAI,CAC5D,CAAC,cAAAZ,qBAAA,uBAJyBA,qBAAA,CAIvBW,qBAAqB,CAACJ,iBAAiB;;EAE1C;EACA,IAAI,CAACA,iBAAiB,EAAE;IACtB,MAAMQ,QAAQ,GAAGjB,qBAAqB,CACnCkB,OAAO,CAAEC,CAAC,IAAKA,CAAC,CA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rE,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMC,wBAAkD,GAAG,MAAAA,CAChEb,UAAU,EACVC,UAAU,EACVxD,MAAM,EACNqE,OAAO,KACJ;EACH,IAAIrE,MAAM,KAAK,WAAW,EAAE;IAC1B,OAAOsD,6BAA6B,CAClCC,UAAU,EACVC,UAAU,EACVxD,MAAM,EACNqE,OACF,CAAC;EACH,CAAC,MAAM,IAAIrE,MAAM,KAAK,cAAc,EAAE;IACpC,OAAO+D,4BAA4B,CACjCR,UAAU,EACVC,UAAU,EACVxD,MAAM,EACNqE,OACF,CAAC;EACH;EAEA,MAAM9D,CAAQ,GAAGP,MAAM;EACvB,MAAM,IAAIS,qBAAa,CAAE,kCAAiCF,CAAE,EAAC,CAAC;AAChE,CAAC;AAAC+D,OAAA,CAAAF,wBAAA,GAAAA,wBAAA"}
|
package/lib/commonjs/index.js
CHANGED
@@ -15,13 +15,20 @@ Object.defineProperty(exports, "AuthorizationDetails", {
|
|
15
15
|
return _par.AuthorizationDetails;
|
16
16
|
}
|
17
17
|
});
|
18
|
-
exports.WalletInstanceAttestation = exports.Trust = exports.SdJwt = exports.PID = exports.Errors = exports.Credential = void 0;
|
18
|
+
exports.WalletInstanceAttestation = exports.WalletInstance = exports.Trust = exports.SdJwt = exports.PID = exports.Errors = exports.Credential = void 0;
|
19
19
|
Object.defineProperty(exports, "createCryptoContextFor", {
|
20
20
|
enumerable: true,
|
21
21
|
get: function () {
|
22
22
|
return _crypto.createCryptoContextFor;
|
23
23
|
}
|
24
24
|
});
|
25
|
+
Object.defineProperty(exports, "fixBase64EncodingOnKey", {
|
26
|
+
enumerable: true,
|
27
|
+
get: function () {
|
28
|
+
return _jwk.fixBase64EncodingOnKey;
|
29
|
+
}
|
30
|
+
});
|
31
|
+
var _jwk = require("./utils/jwk");
|
25
32
|
require("react-native-url-polyfill/auto");
|
26
33
|
var Credential = _interopRequireWildcard(require("./credential"));
|
27
34
|
exports.Credential = Credential;
|
@@ -35,6 +42,8 @@ var WalletInstanceAttestation = _interopRequireWildcard(require("./wallet-instan
|
|
35
42
|
exports.WalletInstanceAttestation = WalletInstanceAttestation;
|
36
43
|
var Trust = _interopRequireWildcard(require("./trust"));
|
37
44
|
exports.Trust = Trust;
|
45
|
+
var WalletInstance = _interopRequireWildcard(require("./wallet-instance"));
|
46
|
+
exports.WalletInstance = WalletInstance;
|
38
47
|
var _par = require("./utils/par");
|
39
48
|
var _crypto = require("./utils/crypto");
|
40
49
|
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); }
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["require","Credential","_interopRequireWildcard","exports","PID","SdJwt","Errors","WalletInstanceAttestation","Trust","_par","_crypto","_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":"
|
1
|
+
{"version":3,"names":["_jwk","require","Credential","_interopRequireWildcard","exports","PID","SdJwt","Errors","WalletInstanceAttestation","Trust","WalletInstance","_par","_crypto","_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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,IAAA,GAAAC,OAAA;AAGAA,OAAA;AAEA,IAAAC,UAAA,GAAAC,uBAAA,CAAAF,OAAA;AAA2CG,OAA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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"}
|
@@ -3,7 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.WalletInstanceAttestationIssuingError = exports.ValidationFailed = exports.PidMetadataError = exports.PidIssuingError = exports.NoSuitableKeysFoundInEntityConfiguration = exports.IoWalletError = exports.ClaimsNotFoundInToken = exports.ClaimsNotFoundBetweenDislosures = exports.AuthRequestDecodeError = void 0;
|
6
|
+
exports.WalletProviderResponseError = exports.WalletInstanceAttestationIssuingError = exports.ValidationFailed = exports.PidMetadataError = exports.PidIssuingError = exports.NoSuitableKeysFoundInEntityConfiguration = exports.IoWalletError = exports.ClaimsNotFoundInToken = exports.ClaimsNotFoundBetweenDislosures = exports.AuthRequestDecodeError = void 0;
|
7
7
|
/**
|
8
8
|
* utility to format a set of attributes into an error message string
|
9
9
|
*
|
@@ -232,5 +232,33 @@ class PidMetadataError extends Error {
|
|
232
232
|
super(message);
|
233
233
|
}
|
234
234
|
}
|
235
|
+
|
236
|
+
/**
|
237
|
+
* An error subclass thrown when a Wallet Provider http request fail
|
238
|
+
*
|
239
|
+
*/
|
235
240
|
exports.PidMetadataError = PidMetadataError;
|
241
|
+
class WalletProviderResponseError extends IoWalletError {
|
242
|
+
static get code() {
|
243
|
+
return "ERR_IO_WALLET_PROVIDER_RESPONSE_FAILED";
|
244
|
+
}
|
245
|
+
code = "ERR_IO_WALLET_PROVIDER_RESPONSE_FAILED";
|
246
|
+
|
247
|
+
/** The Claim for which the validation failed. */
|
248
|
+
|
249
|
+
/** Reason code for the validation failure. */
|
250
|
+
|
251
|
+
constructor(message) {
|
252
|
+
let claim = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : "unspecified";
|
253
|
+
let reason = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "unspecified";
|
254
|
+
super(serializeAttrs({
|
255
|
+
message,
|
256
|
+
claim,
|
257
|
+
reason
|
258
|
+
}));
|
259
|
+
this.claim = claim;
|
260
|
+
this.reason = reason;
|
261
|
+
}
|
262
|
+
}
|
263
|
+
exports.WalletProviderResponseError = WalletProviderResponseError;
|
236
264
|
//# sourceMappingURL=errors.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["serializeAttrs","attrs","Object","entries","map","_ref","k","v","Array","isArray","join","_","IoWalletError","Error","code","constructor","message","_Error$captureStackTr","name","captureStackTrace","call","exports","ValidationFailed","claim","arguments","length","undefined","reason","WalletInstanceAttestationIssuingError","AuthRequestDecodeError","PidIssuingError","ClaimsNotFoundBetweenDislosures","claims","c","ClaimsNotFoundInToken","NoSuitableKeysFoundInEntityConfiguration","scenario","PidMetadataError"],"sourceRoot":"../../../src","sources":["utils/errors.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,cAAc,GAAIC,KAAsC,IAC5DC,MAAM,CAACC,OAAO,CAACF,KAAK,CAAC,CAClBG,GAAG,CAACC,IAAA;EAAA,IAAC,CAACC,CAAC,EAAEC,CAAC,CAAC,GAAAF,IAAA;EAAA,OAAK,CAACC,CAAC,EAAEE,KAAK,CAACC,OAAO,CAACF,CAAC,CAAC,GAAI,IAAGA,CAA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,MAAMG,qBAAqB,SAASrB,KAAK,CAAC;EAC/C,WAAWC,IAAIA,CAAA,EAAoC;IACjD,OAAO,+BAA+B;EACxC;EAEAA,IAAI,GAAG,+BAA+B;;EAEtC;;EAGAC,WAAWA,CAACiB,MAAyB,EAAE;IACrC,MAAMC,CAAC,GAAGzB,KAAK,CAACC,OAAO,CAACuB,MAAM,CAAC,GAAGA,MAAM,GAAG,CAACA,MAAM,CAAC;IACnD,MAAMhB,OAAO,GAAI,yDAAwDiB,CAAC,CAACvB,IAAI,CAC7E,IACF,CAAE,EAAC;IACH,KAAK,CAACM,OAAO,CAAC;IACd,IAAI,CAACgB,MAAM,GAAGC,CAAC;EACjB;AACF;;AAEA;AACA;AACA;AACA;AAHAZ,OAAA,CAAAa,qBAAA,GAAAA,qBAAA;AAIO,MAAMC,wCAAwC,SAAStB,KAAK,CAAC;EAClE,WAAWC,IAAIA,CAAA,EAAqC;IAClD,OAAO,gCAAgC;EACzC;EAEAA,IAAI,GAAG,gCAAgC;;EAEvC;AACF;AACA;EACEC,WAAWA,CAACqB,QAAgB,EAAE;IAC5B,MAAMpB,OAAO,GAAI,0DAAyDoB,QAAS,IAAG;IACtF,KAAK,CAACpB,OAAO,CAAC;EAChB;AACF;;AAEA;AACA;AACA;AACA;AAHAK,OAAA,CAAAc,wCAAA,GAAAA,wCAAA;AAIO,MAAME,gBAAgB,SAASxB,KAAK,CAAC;EAC1C,WAAWC,IAAIA,CAAA,EAAyB;IACtC,OAAO,oBAAoB;EAC7B;EAEAC,WAAWA,CAACC,OAAe,EAAE;IAC3B,KAAK,CAACA,OAAO,CAAC;EAChB;AACF;
|
1
|
+
{"version":3,"names":["serializeAttrs","attrs","Object","entries","map","_ref","k","v","Array","isArray","join","_","IoWalletError","Error","code","constructor","message","_Error$captureStackTr","name","captureStackTrace","call","exports","ValidationFailed","claim","arguments","length","undefined","reason","WalletInstanceAttestationIssuingError","AuthRequestDecodeError","PidIssuingError","ClaimsNotFoundBetweenDislosures","claims","c","ClaimsNotFoundInToken","NoSuitableKeysFoundInEntityConfiguration","scenario","PidMetadataError","WalletProviderResponseError"],"sourceRoot":"../../../src","sources":["utils/errors.ts"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMA,cAAc,GAAIC,KAAsC,IAC5DC,MAAM,CAACC,OAAO,CAACF,KAAK,CAAC,CAClBG,GAAG,CAACC,IAAA;EAAA,IAAC,CAACC,CAAC,EAAEC,CAAC,CAAC,GAAAF,IAAA;EAAA,OAAK,CAACC,CAAC,EAAEE,KAAK,CAACC,OAAO,CAACF,CAAC,CAAC,GAAI,IAAGA,CAAC,CAACG,IAAI,CAAC,IAAI,CAAE,GAAE,GAAGH,CAAC,CAAC;AAAA,EAAC,CAChEH,GAAG,CAAEO,CAAC,IAAKA,CAAC,CAACD,IAAI,CAAC,GAAG,CAAC,CAAC,CACvBA,IAAI,CAAC,GAAG,CAAC;;AAEd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAME,aAAa,SAASC,KAAK,CAAC;EACvC;EACA,WAAWC,IAAIA,CAAA,EAAW;IACxB,OAAO,uBAAuB;EAChC;;EAEA;EACAA,IAAI,GAAW,uBAAuB;EAEtCC,WAAWA,CAACC,OAAgB,EAAE;IAAA,IAAAC,qBAAA;IAC5B,KAAK,CAACD,OAAO,CAAC;IACd,IAAI,CAACE,IAAI,GAAG,IAAI,CAACH,WAAW,CAACG,IAAI;IACjC;IACA,CAAAD,qBAAA,GAAAJ,KAAK,CAACM,iBAAiB,cAAAF,qBAAA,uBAAvBA,qBAAA,CAAAG,IAAA,CAAAP,KAAK,EAAqB,IAAI,EAAE,IAAI,CAACE,WAAW,CAAC;EACnD;AACF;AACA;AACA;AACA;AACA;AAHAM,OAAA,CAAAT,aAAA,GAAAA,aAAA;AAIO,MAAMU,gBAAgB,SAASV,aAAa,CAAC;EAClD,WAAWE,IAAIA,CAAA,EAAsC;IACnD,OAAO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AAA,wCAAA;AAIO,MAAME,gBAAgB,SAASxB,KAAK,CAAC;EAC1C,WAAWC,IAAIA,CAAA,EAAyB;IACtC,OAAO,oBAAoB;EAC7B;EAEAC,WAAWA,CAACC,OAAe,EAAE;IAC3B,KAAK,CAACA,OAAO,CAAC;EAChB;AACF;;AAEA;AACA;AACA;AACA;AAHAK,OAAA,CAAAgB,gBAAA,GAAAA,gBAAA;AAIO,MAAMC,2BAA2B,SAAS1B,aAAa,CAAC;EAC7D,WAAWE,IAAIA,CAAA,EAA6C;IAC1D,OAAO,wCAAwC;EACjD;EAEAA,IAAI,GAAG,wCAAwC;;EAE/C;;EAGA;;EAGAC,WAAWA,CACTC,OAAe,EAGf;IAAA,IAFAO,KAAa,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,aAAa;IAAA,IAC7BG,MAAc,GAAAH,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,aAAa;IAE9B,KAAK,CAACxB,cAAc,CAAC;MAAEgB,OAAO;MAAEO,KAAK;MAAEI;IAAO,CAAC,CAAC,CAAC;IACjD,IAAI,CAACJ,KAAK,GAAGA,KAAK;IAClB,IAAI,CAACI,MAAM,GAAGA,MAAM;EACtB;AACF;AAACN,OAAA,CAAAiB,2BAAA,GAAAA,2BAAA"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["utils/integrity.ts"],"mappings":""}
|
@@ -0,0 +1,29 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.createWalletInstance = createWalletInstance;
|
7
|
+
var _client = require("../client");
|
8
|
+
async function createWalletInstance(context) {
|
9
|
+
const {
|
10
|
+
integrityContext
|
11
|
+
} = context;
|
12
|
+
const api = (0, _client.getWalletProviderClient)(context);
|
13
|
+
|
14
|
+
//1. Obtain nonce
|
15
|
+
const challenge = await api.get("/nonce").then(response => response.nonce);
|
16
|
+
const keyAttestation = await integrityContext.getAttestation(challenge);
|
17
|
+
const hardwareKeyTag = integrityContext.getHardwareKeyTag();
|
18
|
+
|
19
|
+
//2. Create Wallet Instance
|
20
|
+
await api.post("/wallet-instances", {
|
21
|
+
body: {
|
22
|
+
challenge,
|
23
|
+
key_attestation: keyAttestation,
|
24
|
+
hardware_key_tag: hardwareKeyTag
|
25
|
+
}
|
26
|
+
});
|
27
|
+
return hardwareKeyTag;
|
28
|
+
}
|
29
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["_client","require","createWalletInstance","context","integrityContext","api","getWalletProviderClient","challenge","get","then","response","nonce","keyAttestation","getAttestation","hardwareKeyTag","getHardwareKeyTag","post","body","key_attestation","hardware_key_tag"],"sourceRoot":"../../../src","sources":["wallet-instance/index.ts"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAGO,eAAeC,oBAAoBA,CAACC,OAI1C,EAAE;EACD,MAAM;IAAEC;EAAiB,CAAC,GAAGD,OAAO;EAEpC,MAAME,GAAG,GAAG,IAAAC,+BAAuB,EAACH,OAAO,CAAC;;EAE5C;EACA,MAAMI,SAAS,GAAG,MAAMF,GAAG,CAACG,GAAG,CAAC,QAAQ,CAAC,CAACC,IAAI,CAAEC,QAAQ,IAAKA,QAAQ,CAACC,KAAK,CAAC;EAE5E,MAAMC,cAAc,GAAG,MAAMR,gBAAgB,CAACS,cAAc,CAACN,SAAS,CAAC;EACvE,MAAMO,cAAc,GAAGV,gBAAgB,CAACW,iBAAiB,CAAC,CAAC;;EAE3D;EACA,MAAMV,GAAG,CAACW,IAAI,CAAC,mBAAmB,EAAE;IAClCC,IAAI,EAAE;MACJV,SAAS;MACTW,eAAe,EAAEN,cAAc;MAC/BO,gBAAgB,EAAEL;IACpB;EACF,CAAC,CAAC;EAEF,OAAOA,cAAc;AACvB"}
|
@@ -4,13 +4,21 @@ Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
5
5
|
});
|
6
6
|
exports.getAttestation = void 0;
|
7
|
+
exports.getAttestationRequest = getAttestationRequest;
|
7
8
|
var _ioReactNativeJwt = require("@pagopa/io-react-native-jwt");
|
8
9
|
var _jwk = require("../utils/jwk");
|
9
|
-
var
|
10
|
-
var
|
11
|
-
|
12
|
-
|
13
|
-
|
10
|
+
var _client = require("../client");
|
11
|
+
var _zod = require("zod");
|
12
|
+
/**
|
13
|
+
* Getter for an attestation request. The attestation request is a JWT that will be sent to the Wallet Provider to request a Wallet Instance Attestation.
|
14
|
+
*
|
15
|
+
* @param challenge - The nonce received from the Wallet Provider which is part of the signed clientData
|
16
|
+
* @param wiaCryptoContext - The key pair associated with the WIA. Will be use to prove the ownership of the attestation
|
17
|
+
* @param integrityContext - The integrity context which exposes a set of functions to interact with the device integrity service
|
18
|
+
* @param walletProviderBaseUrl - Base url for the Wallet Provider
|
19
|
+
* @returns A JWT containing the attestation request
|
20
|
+
*/
|
21
|
+
async function getAttestationRequest(challenge, wiaCryptoContext, integrityContext, walletProviderBaseUrl) {
|
14
22
|
const jwk = await wiaCryptoContext.getPublicKey();
|
15
23
|
const parsedJwk = _jwk.JWK.parse(jwk);
|
16
24
|
const keyThumbprint = await (0, _ioReactNativeJwt.thumbprint)(parsedJwk);
|
@@ -18,50 +26,31 @@ async function getAttestationRequest(wiaCryptoContext, walletProviderEntityConfi
|
|
18
26
|
...parsedJwk,
|
19
27
|
kid: keyThumbprint
|
20
28
|
};
|
29
|
+
const clientData = {
|
30
|
+
challenge,
|
31
|
+
jwk_thumbprint: keyThumbprint
|
32
|
+
};
|
33
|
+
const hardwareKeyTag = integrityContext.getHardwareKeyTag();
|
34
|
+
const {
|
35
|
+
signature,
|
36
|
+
authenticatorData
|
37
|
+
} = await integrityContext.getHardwareSignatureWithAuthData(JSON.stringify(clientData));
|
21
38
|
return new _ioReactNativeJwt.SignJWT(wiaCryptoContext).setPayload({
|
22
39
|
iss: keyThumbprint,
|
23
|
-
|
24
|
-
|
25
|
-
|
40
|
+
sub: walletProviderBaseUrl,
|
41
|
+
challenge,
|
42
|
+
hardware_signature: signature,
|
43
|
+
integrity_assertion: authenticatorData,
|
44
|
+
hardware_key_tag: hardwareKeyTag,
|
26
45
|
cnf: {
|
27
46
|
jwk: (0, _jwk.fixBase64EncodingOnKey)(publicKey)
|
28
47
|
}
|
29
48
|
}).setProtectedHeader({
|
30
49
|
kid: publicKey.kid,
|
31
|
-
typ: "
|
50
|
+
typ: "war+jwt"
|
32
51
|
}).setIssuedAt().setExpirationTime("1h").sign();
|
33
52
|
}
|
34
53
|
|
35
|
-
/**
|
36
|
-
* Validate a Wallet Instance Attestation token.
|
37
|
-
* Either return true or throw an exception.
|
38
|
-
*
|
39
|
-
* @param wia Signed Wallet Instance Attestation token
|
40
|
-
* @param walletProviderEntityConfiguration Entity Configuration object for the issuing Wallet Provider
|
41
|
-
* @returns The token is valid
|
42
|
-
* @throws {WalletInstanceAttestationIssuingError} When the received token fails to validate. This can happen due to invalid signature, expired token or malformed JWT token.
|
43
|
-
*/
|
44
|
-
async function verifyWalletInstanceAttestation(wia, walletProviderEntityConfiguration) {
|
45
|
-
const {
|
46
|
-
payload: {
|
47
|
-
sub,
|
48
|
-
metadata: {
|
49
|
-
wallet_provider: {
|
50
|
-
jwks: {
|
51
|
-
keys
|
52
|
-
}
|
53
|
-
}
|
54
|
-
}
|
55
|
-
}
|
56
|
-
} = walletProviderEntityConfiguration;
|
57
|
-
return (0, _ioReactNativeJwt.verify)(wia, keys, {
|
58
|
-
issuer: sub
|
59
|
-
}).then(_ => true).catch(ex => {
|
60
|
-
const reason = ex && ex instanceof Error ? ex.message : "unknown reason";
|
61
|
-
throw new _errors.WalletInstanceAttestationIssuingError("Unable to validate received wallet instance attestation", reason);
|
62
|
-
});
|
63
|
-
}
|
64
|
-
|
65
54
|
/**
|
66
55
|
* Request a Wallet Instance Attestation (WIA) to the Wallet provider
|
67
56
|
*
|
@@ -70,39 +59,32 @@ async function verifyWalletInstanceAttestation(wia, walletProviderEntityConfigur
|
|
70
59
|
* @param walletProviderBaseUrl Base url for the Wallet Provider
|
71
60
|
* @returns The retrieved Wallet Instance Attestation token
|
72
61
|
*/
|
73
|
-
const getAttestation = _ref => {
|
62
|
+
const getAttestation = async _ref => {
|
74
63
|
let {
|
75
64
|
wiaCryptoContext,
|
65
|
+
integrityContext,
|
66
|
+
walletProviderBaseUrl,
|
76
67
|
appFetch = fetch
|
77
68
|
} = _ref;
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
69
|
+
const api = (0, _client.getWalletProviderClient)({
|
70
|
+
walletProviderBaseUrl,
|
71
|
+
appFetch
|
72
|
+
});
|
73
|
+
|
74
|
+
// 1. Get nonce from backend
|
75
|
+
const challenge = await api.get("/nonce").then(response => response.nonce);
|
76
|
+
|
77
|
+
// 2. Get a signed attestation request
|
78
|
+
const signedAttestationRequest = await getAttestationRequest(challenge, wiaCryptoContext, integrityContext, walletProviderBaseUrl);
|
79
|
+
|
80
|
+
// 3. Request WIA
|
81
|
+
const wia = await api.post("/token", {
|
82
|
+
body: {
|
83
|
+
grant_type: "urn:ietf:params:oauth:grant-type:jwt-bearer",
|
90
84
|
assertion: signedAttestationRequest
|
91
|
-
};
|
92
|
-
const response = await appFetch(tokenUrl, {
|
93
|
-
method: "POST",
|
94
|
-
headers: {
|
95
|
-
"Content-Type": "application/json"
|
96
|
-
},
|
97
|
-
body: JSON.stringify(requestBody)
|
98
|
-
});
|
99
|
-
if (response.status !== 201) {
|
100
|
-
throw new _errors.WalletInstanceAttestationIssuingError("Unable to obtain wallet instance attestation from wallet provider", `Response code: ${response.status}`);
|
101
85
|
}
|
102
|
-
|
103
|
-
|
104
|
-
return wia;
|
105
|
-
};
|
86
|
+
}).then(result => _zod.z.string().parse(result));
|
87
|
+
return wia;
|
106
88
|
};
|
107
89
|
exports.getAttestation = getAttestation;
|
108
90
|
//# sourceMappingURL=issuing.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_ioReactNativeJwt","require","_jwk","
|
1
|
+
{"version":3,"names":["_ioReactNativeJwt","require","_jwk","_client","_zod","getAttestationRequest","challenge","wiaCryptoContext","integrityContext","walletProviderBaseUrl","jwk","getPublicKey","parsedJwk","JWK","parse","keyThumbprint","thumbprint","publicKey","kid","clientData","jwk_thumbprint","hardwareKeyTag","getHardwareKeyTag","signature","authenticatorData","getHardwareSignatureWithAuthData","JSON","stringify","SignJWT","setPayload","iss","sub","hardware_signature","integrity_assertion","hardware_key_tag","cnf","fixBase64EncodingOnKey","setProtectedHeader","typ","setIssuedAt","setExpirationTime","sign","getAttestation","_ref","appFetch","fetch","api","getWalletProviderClient","get","then","response","nonce","signedAttestationRequest","wia","post","body","grant_type","assertion","result","z","string","exports"],"sourceRoot":"../../../src","sources":["wallet-instance-attestation/issuing.ts"],"mappings":";;;;;;;AACA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,IAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AAEA,IAAAG,IAAA,GAAAH,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,eAAeI,qBAAqBA,CACzCC,SAAiB,EACjBC,gBAA+B,EAC/BC,gBAAkC,EAClCC,qBAA6B,EACZ;EACjB,MAAMC,GAAG,GAAG,MAAMH,gBAAgB,CAACI,YAAY,CAAC,CAAC;EACjD,MAAMC,SAAS,GAAGC,QAAG,CAACC,KAAK,CAACJ,GAAG,CAAC;EAChC,MAAMK,aAAa,GAAG,MAAM,IAAAC,4BAAU,EAACJ,SAAS,CAAC;EACjD,MAAMK,SAAS,GAAG;IAAE,GAAGL,SAAS;IAAEM,GAAG,EAAEH;EAAc,CAAC;EAEtD,MAAMI,UAAU,GAAG;I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gBAAgB,EAChBC,gBAAgB,EAChBC,qBACF,CAAC;;EAED;EACA,MAAM4C,GAAG,GAAG,MAAMP,GAAG,CAClBQ,IAAI,CAAC,QAAQ,EAAE;IACdC,IAAI,EAAE;MACJC,UAAU,EAAE,6CAA6C;MACzDC,SAAS,EAAEL;IACb;EACF,CAAC,CAAC,CACDH,IAAI,CAAES,MAAM,IAAKC,MAAC,CAACC,MAAM,CAAC,CAAC,CAAC9C,KAAK,CAAC4C,MAAM,CAAC,CAAC;EAE7C,OAAOL,GAAG;AACZ,CAAC;AAACQ,OAAA,CAAAnB,cAAA,GAAAA,cAAA"}
|
@@ -32,7 +32,7 @@ const Jwt = z.object({
|
|
32
32
|
});
|
33
33
|
const WalletInstanceAttestationRequestJwt = z.object({
|
34
34
|
header: z.intersection(Jwt.shape.header, z.object({
|
35
|
-
typ: z.literal("
|
35
|
+
typ: z.literal("war+jwt")
|
36
36
|
})),
|
37
37
|
payload: z.intersection(Jwt.shape.payload, z.object({
|
38
38
|
aud: z.string(),
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["_jwk","require","z","_interopRequireWildcard","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","UnixTime","number","min","max","Jwt","object","header","alg","string","kid","typ","x5c","array","optional","trust_chain","payload","iss","iat","exp","cnf","jwk","intersection","JWK","WalletInstanceAttestationRequestJwt","shape","literal","aud","jti","nonce","exports","WalletInstanceAttestationJwt","sub","attested_security_context","authorization_endpoint","response_types_supported","vp_formats_supported","jwt_vp_json","alg_values_supported","jwt_vc_json","request_object_signing_alg_values_supported","presentation_definition_uri_supported","boolean"],"sourceRoot":"../../../src","sources":["wallet-instance-attestation/types.ts"],"mappings":";;;;;;AAAA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,CAAA,GAAAC,uBAAA,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D,MAAMC,GAAG,GAAG5B,CAAC,CAAC6B,MAAM,CAAC;EACnBC,MAAM,EAAE9B,CAAC,CAAC6B,MAAM,CAAC;IACfE,GAAG,EAAE/B,CAAC,CAACgC,MAAM,CAAC,CAAC;IACfC,GAAG,EAAEjC,CAAC,CAACgC,MAAM,CAAC,CAAC;IACfE,GAAG,EAAElC,CAAC,CAACgC,MAAM,CAAC,CAAC;IACfG,GAAG,EAAEnC,CAAC,CAACoC,KAAK,CAACpC,CAAC,CAACgC,MAAM,CAAC,CAAC,CAAC,CAACK,QAAQ,CAAC,CAAC;IACnCC,WAAW,EAAEtC,CAAC,CAACoC,KAAK,CAACpC,CAAC,CAACgC,MAAM,CAAC,CAAC,CAAC,CAACK,QAAQ,CAAC;EAC5C,CAAC,CAAC;EACFE,OAAO,EAAEvC,CAAC,CAAC6B,MAAM,CAAC;IAChBW,GAAG,EAAExC,CAAC,CAACgC,MAAM,CAAC,CAAC;IACfS,GAAG,EAAEjB,QAAQ;IACbkB,GAAG,EAAElB,QAAQ;IACbmB,GAAG,EAAE3C,CAAC,CAAC6B,MAAM,CAAC;MACZe,GAAG,EAAE5C,CAAC,CAAC6C,YAAY,CACjBC,QAAG;MACH;MACA9C,CAAC,CAAC6B,MAAM,CAAC;QAAEI,GAAG,EAAEjC,CAAC,CAACgC,MAAM,CAAC;MAAE,CAAC,CAC9B;IACF,CAAC;EACH,CAAC;AACH,CAAC,CAAC;AAKK,MAAMe,mCAAmC,GAAG/C,CAAC,CAAC6B,MAAM,CAAC;EAC1DC,MAAM,EAAE9B,CAAC,CAAC6C,YAAY,CACpBjB,GAAG,CAACoB,KAAK,CAAClB,MAAM,EAChB9B,CAAC,CAAC6B,MAAM,CAAC;IACPK,GAAG,EAAElC,CAAC,CAACiD,OAAO,CAAC,
|
1
|
+
{"version":3,"names":["_jwk","require","z","_interopRequireWildcard","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","UnixTime","number","min","max","Jwt","object","header","alg","string","kid","typ","x5c","array","optional","trust_chain","payload","iss","iat","exp","cnf","jwk","intersection","JWK","WalletInstanceAttestationRequestJwt","shape","literal","aud","jti","nonce","exports","WalletInstanceAttestationJwt","sub","attested_security_context","authorization_endpoint","response_types_supported","vp_formats_supported","jwt_vp_json","alg_values_supported","jwt_vc_json","request_object_signing_alg_values_supported","presentation_definition_uri_supported","boolean"],"sourceRoot":"../../../src","sources":["wallet-instance-attestation/types.ts"],"mappings":";;;;;;AAAA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,CAAA,GAAAC,uBAAA,CAAAF,OAAA;AAAyB,SAAAG,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,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,CAAA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