@pagopa/io-react-native-wallet 0.6.1 → 0.7.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/pid/issuing.js +58 -12
- package/lib/commonjs/pid/issuing.js.map +1 -1
- package/lib/commonjs/rp/__test__/index.test.js +20 -18
- package/lib/commonjs/rp/__test__/index.test.js.map +1 -1
- package/lib/commonjs/rp/index.js +2 -2
- package/lib/commonjs/rp/index.js.map +1 -1
- package/lib/commonjs/trust/types.js +3 -1
- package/lib/commonjs/trust/types.js.map +1 -1
- package/lib/commonjs/utils/decoder.js +46 -0
- package/lib/commonjs/utils/decoder.js.map +1 -0
- package/lib/commonjs/wallet-instance-attestation/issuing.js +35 -3
- package/lib/commonjs/wallet-instance-attestation/issuing.js.map +1 -1
- package/lib/module/pid/issuing.js +59 -12
- package/lib/module/pid/issuing.js.map +1 -1
- package/lib/module/rp/__test__/index.test.js +20 -18
- package/lib/module/rp/__test__/index.test.js.map +1 -1
- package/lib/module/rp/index.js +2 -2
- package/lib/module/rp/index.js.map +1 -1
- package/lib/module/trust/types.js +3 -1
- package/lib/module/trust/types.js.map +1 -1
- package/lib/module/utils/decoder.js +40 -0
- package/lib/module/utils/decoder.js.map +1 -0
- package/lib/module/wallet-instance-attestation/issuing.js +35 -3
- package/lib/module/wallet-instance-attestation/issuing.js.map +1 -1
- package/lib/typescript/pid/issuing.d.ts +4 -4
- package/lib/typescript/pid/issuing.d.ts.map +1 -1
- package/lib/typescript/rp/types.d.ts +4 -4
- package/lib/typescript/trust/index.d.ts +50 -46
- package/lib/typescript/trust/index.d.ts.map +1 -1
- package/lib/typescript/trust/types.d.ts +1020 -684
- package/lib/typescript/trust/types.d.ts.map +1 -1
- package/lib/typescript/utils/decoder.d.ts +6 -0
- package/lib/typescript/utils/decoder.d.ts.map +1 -0
- package/lib/typescript/wallet-instance-attestation/issuing.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/pid/issuing.ts +75 -8
- package/src/rp/__test__/index.test.ts +23 -21
- package/src/rp/index.ts +2 -2
- package/src/trust/types.ts +1 -1
- package/src/utils/decoder.ts +44 -0
- package/src/wallet-instance-attestation/issuing.ts +46 -5
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/trust/types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,eAAO,MAAM,SAAS;;;;;;;;;EAAuD,CAAC;AAC9E,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAyBlD,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAC9D,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAc1B,CAAC;AAEH,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAC7C,OAAO,yBAAyB,CACjC,CAAC;AACF,eAAO,MAAM,yBAAyB;;;;;;;;;;;;EAIpC,CAAC;AAqCH,MAAM,MAAM,8BAA8B,GAAG,CAAC,CAAC,KAAK,CAClD,OAAO,8BAA8B,CACtC,CAAC;AACF,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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kB,aACnB,MAAM,KACf,QAAQ;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,eAAe,CAAA;CAAE,CAkBtD,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"issuing.d.ts","sourceRoot":"","sources":["../../../src/wallet-instance-attestation/issuing.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,6BAA6B,CAAC;AAOrC,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,gBAAgB,CAAC;
|
1
|
+
{"version":3,"file":"issuing.d.ts","sourceRoot":"","sources":["../../../src/wallet-instance-attestation/issuing.ts"],"names":[],"mappings":";AAAA,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,6BAA6B,CAAC;AAOrC,OAAO,KAAK,EAAE,iCAAiC,EAAE,MAAM,gBAAgB,CAAC;AAgExE;;;;;;;GAOG;AACH,eAAO,MAAM,cAAc;sBAKL,aAAa;;;;;0CAII,iCAAiC,KACnE,QAAQ,MAAM,CA8ChB,CAAC"}
|
package/package.json
CHANGED
package/src/pid/issuing.ts
CHANGED
@@ -4,6 +4,7 @@ import {
|
|
4
4
|
SignJWT,
|
5
5
|
thumbprint,
|
6
6
|
} from "@pagopa/io-react-native-jwt";
|
7
|
+
|
7
8
|
import { JWK } from "../utils/jwk";
|
8
9
|
import uuid from "react-native-uuid";
|
9
10
|
import { PidIssuingError } from "../utils/errors";
|
@@ -13,6 +14,10 @@ import * as WalletInstanceAttestation from "../wallet-instance-attestation";
|
|
13
14
|
import { generate, deleteKey } from "@pagopa/io-react-native-crypto";
|
14
15
|
import { SdJwt } from ".";
|
15
16
|
import { createCryptoContextFor } from "../utils/crypto";
|
17
|
+
|
18
|
+
import * as z from "zod";
|
19
|
+
import { getJwtFromFormPost } from "../utils/decoder";
|
20
|
+
|
16
21
|
// This is a temporary type that will be used for demo purposes only
|
17
22
|
export type CieData = {
|
18
23
|
birthDate: string;
|
@@ -37,6 +42,15 @@ export type PidResponse = {
|
|
37
42
|
format: string;
|
38
43
|
};
|
39
44
|
|
45
|
+
type AuthenticationRequestResponse = z.infer<
|
46
|
+
typeof AuthenticationRequestResponse
|
47
|
+
>;
|
48
|
+
const AuthenticationRequestResponse = z.object({
|
49
|
+
code: z.string(),
|
50
|
+
state: z.string(), // TODO: refine to known paths using literals
|
51
|
+
iss: z.string(),
|
52
|
+
});
|
53
|
+
|
40
54
|
const assertionType =
|
41
55
|
"urn:ietf:params:oauth:client-assertion-type:jwt-client-attestation";
|
42
56
|
|
@@ -135,14 +149,60 @@ const getPar =
|
|
135
149
|
);
|
136
150
|
};
|
137
151
|
|
152
|
+
/**
|
153
|
+
* Make an authorization request
|
154
|
+
*/
|
155
|
+
const getAuthenticationRequest =
|
156
|
+
({ appFetch = fetch }: { appFetch?: GlobalFetch["fetch"] }) =>
|
157
|
+
async (
|
158
|
+
clientId: string,
|
159
|
+
requestUri: string,
|
160
|
+
pidProviderEntityConfiguration: CredentialIssuerEntityConfiguration,
|
161
|
+
cieData: CieData
|
162
|
+
): Promise<AuthenticationRequestResponse> => {
|
163
|
+
const authzRequestEndpoint =
|
164
|
+
pidProviderEntityConfiguration.payload.metadata.openid_credential_issuer
|
165
|
+
.authorization_endpoint;
|
166
|
+
|
167
|
+
/* User's personal data is not supposed to transit in this flow,
|
168
|
+
* but to be provided to the PID issuer directly by its chosen authentication method (CIE).
|
169
|
+
* Being the project in an initial phase, and being we were still unable to fully comply with authentication,
|
170
|
+
* we temporarily provide data from the App's logged user.
|
171
|
+
* */
|
172
|
+
const params = new URLSearchParams({
|
173
|
+
client_id: clientId,
|
174
|
+
request_uri: requestUri,
|
175
|
+
name: cieData.name,
|
176
|
+
surname: cieData.surname,
|
177
|
+
birth_date: cieData.birthDate,
|
178
|
+
fiscal_code: cieData.fiscalCode,
|
179
|
+
});
|
180
|
+
|
181
|
+
const response = await appFetch(authzRequestEndpoint + "?" + params, {
|
182
|
+
method: "GET",
|
183
|
+
});
|
184
|
+
|
185
|
+
if (response.status === 200) {
|
186
|
+
const formData = await response.text();
|
187
|
+
const { decodedJwt } = await getJwtFromFormPost(formData);
|
188
|
+
const parsed = AuthenticationRequestResponse.parse(decodedJwt.payload);
|
189
|
+
return parsed;
|
190
|
+
}
|
191
|
+
|
192
|
+
throw new PidIssuingError(
|
193
|
+
`Unable to obtain Authorization Request. Response code: ${await response.text()}`
|
194
|
+
);
|
195
|
+
};
|
196
|
+
|
138
197
|
/**
|
139
198
|
* Start the issuing flow by generating an authorization request to the PID Provider. Obtain from the PID Provider an access token to be used to complete the issuing flow.
|
140
199
|
*
|
141
200
|
* @param params.wiaCryptoContext The key pair associated with the WIA. Will be use to prove the ownership of the attestation.
|
142
201
|
* @param params.appFetch (optional) Http client
|
143
202
|
* @param walletInstanceAttestation Wallet Instance Attestation token.
|
144
|
-
* @param walletProviderBaseUrl Base url for the Wallet Provider
|
203
|
+
* @param walletProviderBaseUrl Base url for the Wallet Provider.
|
145
204
|
* @param pidProviderEntityConfiguration The Entity Configuration of the PID Provider, from which discover public endooints.
|
205
|
+
* @param cieData Data red from the CIE login process
|
146
206
|
* @returns The access token along with the values that identify the issuing session.
|
147
207
|
*/
|
148
208
|
export const authorizeIssuing =
|
@@ -156,17 +216,18 @@ export const authorizeIssuing =
|
|
156
216
|
async (
|
157
217
|
walletInstanceAttestation: string,
|
158
218
|
walletProviderBaseUrl: string,
|
159
|
-
pidProviderEntityConfiguration: CredentialIssuerEntityConfiguration
|
219
|
+
pidProviderEntityConfiguration: CredentialIssuerEntityConfiguration,
|
220
|
+
cieData: CieData
|
160
221
|
): Promise<AuthorizationConf> => {
|
161
222
|
// FIXME: do better
|
162
223
|
const clientId = await wiaCryptoContext.getPublicKey().then((_) => _.kid);
|
163
224
|
const codeVerifier = `${uuid.v4()}`;
|
164
|
-
|
225
|
+
|
165
226
|
const tokenUrl =
|
166
227
|
pidProviderEntityConfiguration.payload.metadata.openid_credential_issuer
|
167
228
|
.token_endpoint;
|
168
229
|
|
169
|
-
await getPar({ wiaCryptoContext, appFetch })(
|
230
|
+
const requestUri = await getPar({ wiaCryptoContext, appFetch })(
|
170
231
|
clientId,
|
171
232
|
codeVerifier,
|
172
233
|
walletProviderBaseUrl,
|
@@ -174,6 +235,15 @@ export const authorizeIssuing =
|
|
174
235
|
walletInstanceAttestation
|
175
236
|
);
|
176
237
|
|
238
|
+
const authenticationRequest = await getAuthenticationRequest({})(
|
239
|
+
clientId,
|
240
|
+
requestUri,
|
241
|
+
pidProviderEntityConfiguration,
|
242
|
+
cieData
|
243
|
+
);
|
244
|
+
|
245
|
+
const authorizationCode = authenticationRequest.code;
|
246
|
+
|
177
247
|
// Use an ephemeral key to be destroyed after use
|
178
248
|
const keytag = `ephemeral-${uuid.v4()}`;
|
179
249
|
await generate(keytag);
|
@@ -257,7 +327,6 @@ const createNonceProof = async (
|
|
257
327
|
* @param params.pidCryptoContext The key pair associated with the PID. Will be use to prove the ownership of the credential.
|
258
328
|
* @param params.appFetch (optional) Http client
|
259
329
|
* @param authConf The authorization configuration retrieved with the access token
|
260
|
-
* @param cieData Data red from the CIE login process
|
261
330
|
* @returns The PID credential token
|
262
331
|
*/
|
263
332
|
export const getCredential =
|
@@ -270,8 +339,7 @@ export const getCredential =
|
|
270
339
|
}) =>
|
271
340
|
async (
|
272
341
|
{ nonce, accessToken, clientId, walletProviderBaseUrl }: AuthorizationConf,
|
273
|
-
pidProviderEntityConfiguration: CredentialIssuerEntityConfiguration
|
274
|
-
cieData: CieData
|
342
|
+
pidProviderEntityConfiguration: CredentialIssuerEntityConfiguration
|
275
343
|
): Promise<PidResponse> => {
|
276
344
|
const signedDPopForPid = await createDPopToken(
|
277
345
|
{
|
@@ -300,7 +368,6 @@ export const getCredential =
|
|
300
368
|
format: "vc+sd-jwt",
|
301
369
|
proof: JSON.stringify({
|
302
370
|
jwt: signedNonceProof,
|
303
|
-
cieData,
|
304
371
|
proof_type: "jwt",
|
305
372
|
}),
|
306
373
|
};
|
@@ -211,27 +211,29 @@ describe("RpEntityConfiguration", () => {
|
|
211
211
|
alg: ["EdDSA", "ES256K"],
|
212
212
|
},
|
213
213
|
},
|
214
|
-
jwks:
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
214
|
+
jwks: {
|
215
|
+
keys: [
|
216
|
+
{
|
217
|
+
crv: "P-256",
|
218
|
+
d: "KzQBowMMoPmSZe7G8QsdEWc1IvR2nsgE8qTOYmMcLtc",
|
219
|
+
kid: "dDwPWXz5sCtczj7CJbqgPGJ2qQ83gZ9Sfs-tJyULi6s",
|
220
|
+
use: "sig",
|
221
|
+
kty: "EC",
|
222
|
+
x: "TSO-KOqdnUj5SUuasdlRB2VVFSqtJOxuR5GftUTuBdk",
|
223
|
+
y: "ByWgQt1wGBSnF56jQqLdoO1xKUynMY-BHIDB3eXlR7",
|
224
|
+
},
|
225
|
+
{
|
226
|
+
kty: "RSA",
|
227
|
+
d: "QUZsh1NqvpueootsdSjFQz-BUvxwd3Qnzm5qNb-WeOsvt3rWMEv0Q8CZrla2tndHTJhwioo1U4NuQey7znijhZ177bUwPPxSW1r68dEnL2U74nKwwoYeeMdEXnUfZSPxzs7nY6b7vtyCoA-AjiVYFOlgKNAItspv1HxeyGCLhLYhKvS_YoTdAeLuegETU5D6K1xGQIuw0nS13Icjz79Y8jC10TX4FdZwdX-NmuIEDP5-s95V9DMENtVqJAVE3L-wO-NdDilyjyOmAbntgsCzYVGH9U3W_djh4t3qVFCv3r0S-DA2FD3THvlrFi655L0QHR3gu_Fbj3b9Ybtajpue_Q",
|
228
|
+
e: "AQAB",
|
229
|
+
use: "enc",
|
230
|
+
kid: "9Cquk0X-fNPSdePQIgQcQZtD6J0IjIRrFigW2PPK_-w",
|
231
|
+
n: "utqtxbs-jnK0cPsV7aRkkZKA9t4S-WSZa3nCZtYIKDpgLnR_qcpeF0diJZvKOqXmj2cXaKFUE-8uHKAHo7BL7T-Rj2x3vGESh7SG1pE0thDGlXj4yNsg0qNvCXtk703L2H3i1UXwx6nq1uFxD2EcOE4a6qDYBI16Zl71TUZktJwmOejoHl16CPWqDLGo9GUSk_MmHOV20m4wXWkB4qbvpWVY8H6b2a0rB1B1YPOs5ZLYarSYZgjDEg6DMtZ4NgiwZ-4N1aaLwyO-GLwt9Vf-NBKwoxeRyD3zWE2FXRFBbhKGksMrCGnFDsNl5JTlPjaM3kYyImE941ggcuc495m-Fw",
|
232
|
+
p: "2zmGXIMCEHPphw778YjVTar1eycih6fFSJ4I4bl1iq167GqO0PjlOx6CZ1-OdBTVU7HfrYRiUK_BnGRdPDn-DQghwwkB79ZdHWL14wXnpB5y-boHz_LxvjsEqXtuQYcIkidOGaMG68XNT1nM4F9a8UKFr5hHYT5_UIQSwsxlRQ0",
|
233
|
+
q: "2jMFt2iFrdaYabdXuB4QMboVjPvbLA-IVb6_0hSG_-EueGBvgcBxdFGIZaG6kqHqlB7qMsSzdptU0vn6IgmCZnX-Hlt6c5X7JB_q91PZMLTO01pbZ2Bk58GloalCHnw_mjPh0YPviH5jGoWM5RHyl_HDDMI-UeLkzP7ImxGizrM",
|
234
|
+
},
|
235
|
+
],
|
236
|
+
},
|
235
237
|
},
|
236
238
|
},
|
237
239
|
authority_hints: [
|
package/src/rp/index.ts
CHANGED
@@ -32,7 +32,7 @@ const chooseRSAPublicKeyToEncrypt = (
|
|
32
32
|
entity: RelyingPartyEntityConfiguration
|
33
33
|
): JWK => {
|
34
34
|
const [usingRsa256] =
|
35
|
-
entity.payload.metadata.wallet_relying_party.jwks.filter(
|
35
|
+
entity.payload.metadata.wallet_relying_party.jwks.keys.filter(
|
36
36
|
(jwk) => jwk.use === "enc" && jwk.kty === "RSA"
|
37
37
|
);
|
38
38
|
|
@@ -127,7 +127,7 @@ export const getRequestObject =
|
|
127
127
|
// to ensure the request object is authentic
|
128
128
|
{
|
129
129
|
const pubKey =
|
130
|
-
rpEntityConfiguration.payload.metadata.wallet_relying_party.jwks.find(
|
130
|
+
rpEntityConfiguration.payload.metadata.wallet_relying_party.jwks.keys.find(
|
131
131
|
({ kid }) => kid === responseJwt.protectedHeader.kid
|
132
132
|
);
|
133
133
|
if (!pubKey) {
|
package/src/trust/types.ts
CHANGED
@@ -158,7 +158,7 @@ export const RelyingPartyEntityConfiguration = BaseEntityConfiguration.and(
|
|
158
158
|
application_type: z.string().optional(),
|
159
159
|
client_id: z.string().optional(),
|
160
160
|
client_name: z.string().optional(),
|
161
|
-
jwks: z.array(JWK),
|
161
|
+
jwks: z.object({ keys: z.array(JWK) }),
|
162
162
|
contacts: z.array(z.string()).optional(),
|
163
163
|
})
|
164
164
|
.passthrough(),
|
@@ -0,0 +1,44 @@
|
|
1
|
+
import { decode as decodeJwt } from "@pagopa/io-react-native-jwt";
|
2
|
+
import type { JWTDecodeResult } from "@pagopa/io-react-native-jwt/lib/typescript/types";
|
3
|
+
import { ValidationFailed } from "./errors";
|
4
|
+
|
5
|
+
/*
|
6
|
+
* Decode a form_post.jwt and return the final JWT.
|
7
|
+
* The formData here is in form_post.jwt format as defined in
|
8
|
+
* JWT Secured Authorization Response Mode for OAuth 2.0 (JARM)
|
9
|
+
* HTTP/1.1 200 OK
|
10
|
+
* Content-Type: text/html;charset=UTF-8
|
11
|
+
* Cache-Control: no-cache, no-store
|
12
|
+
* Pragma: no-cache
|
13
|
+
*
|
14
|
+
* <html>
|
15
|
+
* <head><title>Submit This Form</title></head>
|
16
|
+
* <body onload="javascript:document.forms[0].submit()">
|
17
|
+
* <form method="post" action="https://client.example.com/cb">
|
18
|
+
* <input type="hidden" name="response"
|
19
|
+
* value="eyJhbGciOiJSUz....."/>
|
20
|
+
* </form>
|
21
|
+
* </body>
|
22
|
+
* </html>
|
23
|
+
*/
|
24
|
+
export const getJwtFromFormPost = async (
|
25
|
+
formData: string
|
26
|
+
): Promise<{ jwt: string; decodedJwt: JWTDecodeResult }> => {
|
27
|
+
const formPostRegex = /<input(.|\n)*value\s*=\s*"((.|\n)*)"(.|\n)*>/gm;
|
28
|
+
const lineExpressionRegex = /\r\n|\n\r|\n|\r|\s+/g;
|
29
|
+
|
30
|
+
const matches = formPostRegex.exec(formData);
|
31
|
+
if (matches && matches.length >= 2) {
|
32
|
+
const responseJwt = matches[2];
|
33
|
+
|
34
|
+
if (responseJwt) {
|
35
|
+
const jwt = responseJwt.replace(lineExpressionRegex, "");
|
36
|
+
const decodedJwt = await decodeJwt(jwt);
|
37
|
+
return { jwt, decodedJwt };
|
38
|
+
}
|
39
|
+
}
|
40
|
+
|
41
|
+
throw new ValidationFailed(
|
42
|
+
`Unable to obtain JWT from form_post.jwt. Form data: ${formData}`
|
43
|
+
);
|
44
|
+
};
|
@@ -38,6 +38,40 @@ async function getAttestationRequest(
|
|
38
38
|
.sign();
|
39
39
|
}
|
40
40
|
|
41
|
+
/**
|
42
|
+
* Validate a Wallet Instance Attestation token.
|
43
|
+
* Either return true or throw an exception.
|
44
|
+
*
|
45
|
+
* @param wia Signed Wallet Instance Attestation token
|
46
|
+
* @param walletProviderEntityConfiguration Entity Configuration object for the issuing Wallet Provider
|
47
|
+
* @returns The token is valid
|
48
|
+
* @throws {WalletInstanceAttestationIssuingError} When the received token fails to validate. This can happen due to invalid signature, expired token or malformed JWT token.
|
49
|
+
*/
|
50
|
+
async function verifyWalletInstanceAttestation(
|
51
|
+
wia: string,
|
52
|
+
walletProviderEntityConfiguration: WalletProviderEntityConfiguration
|
53
|
+
): Promise<true> {
|
54
|
+
const {
|
55
|
+
payload: {
|
56
|
+
sub,
|
57
|
+
metadata: {
|
58
|
+
wallet_provider: {
|
59
|
+
jwks: { keys },
|
60
|
+
},
|
61
|
+
},
|
62
|
+
},
|
63
|
+
} = walletProviderEntityConfiguration;
|
64
|
+
return verifyJwt(wia, keys, { issuer: sub })
|
65
|
+
.then((_) => true as const)
|
66
|
+
.catch((ex) => {
|
67
|
+
const reason = ex && ex instanceof Error ? ex.message : "unknown reason";
|
68
|
+
throw new WalletInstanceAttestationIssuingError(
|
69
|
+
"Unable to validate received wallet instance attestation",
|
70
|
+
reason
|
71
|
+
);
|
72
|
+
});
|
73
|
+
}
|
74
|
+
|
41
75
|
/**
|
42
76
|
* Request a Wallet Instance Attestation (WIA) to the Wallet provider
|
43
77
|
*
|
@@ -87,12 +121,19 @@ export const getAttestation =
|
|
87
121
|
body: JSON.stringify(requestBody),
|
88
122
|
});
|
89
123
|
|
90
|
-
if (response.status
|
91
|
-
|
124
|
+
if (response.status !== 201) {
|
125
|
+
throw new WalletInstanceAttestationIssuingError(
|
126
|
+
"Unable to obtain wallet instance attestation from wallet provider",
|
127
|
+
`Response code: ${response.status}`
|
128
|
+
);
|
92
129
|
}
|
93
130
|
|
94
|
-
|
95
|
-
|
96
|
-
|
131
|
+
const wia = await response.text();
|
132
|
+
|
133
|
+
await verifyWalletInstanceAttestation(
|
134
|
+
wia,
|
135
|
+
walletProviderEntityConfiguration
|
97
136
|
);
|
137
|
+
|
138
|
+
return wia;
|
98
139
|
};
|