@pagopa/io-react-native-wallet 0.4.3 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (94) hide show
  1. package/README.md +128 -19
  2. package/lib/commonjs/index.js +16 -23
  3. package/lib/commonjs/index.js.map +1 -1
  4. package/lib/commonjs/pid/index.js +3 -8
  5. package/lib/commonjs/pid/index.js.map +1 -1
  6. package/lib/commonjs/pid/issuing.js +153 -176
  7. package/lib/commonjs/pid/issuing.js.map +1 -1
  8. package/lib/commonjs/rp/__test__/index.test.js +7 -5
  9. package/lib/commonjs/rp/__test__/index.test.js.map +1 -1
  10. package/lib/commonjs/rp/index.js +145 -155
  11. package/lib/commonjs/rp/index.js.map +1 -1
  12. package/lib/commonjs/rp/types.js +1 -21
  13. package/lib/commonjs/rp/types.js.map +1 -1
  14. package/lib/commonjs/trust/index.js +24 -5
  15. package/lib/commonjs/trust/index.js.map +1 -1
  16. package/lib/commonjs/trust/types.js +102 -9
  17. package/lib/commonjs/trust/types.js.map +1 -1
  18. package/lib/commonjs/utils/crypto.js +46 -0
  19. package/lib/commonjs/utils/crypto.js.map +1 -0
  20. package/lib/commonjs/utils/dpop.js +14 -7
  21. package/lib/commonjs/utils/dpop.js.map +1 -1
  22. package/lib/commonjs/wallet-instance-attestation/index.js +3 -3
  23. package/lib/commonjs/wallet-instance-attestation/issuing.js +42 -60
  24. package/lib/commonjs/wallet-instance-attestation/issuing.js.map +1 -1
  25. package/lib/module/index.js +4 -6
  26. package/lib/module/index.js.map +1 -1
  27. package/lib/module/pid/index.js +1 -1
  28. package/lib/module/pid/index.js.map +1 -1
  29. package/lib/module/pid/issuing.js +152 -180
  30. package/lib/module/pid/issuing.js.map +1 -1
  31. package/lib/module/rp/__test__/index.test.js +3 -3
  32. package/lib/module/rp/__test__/index.test.js.map +1 -1
  33. package/lib/module/rp/index.js +141 -154
  34. package/lib/module/rp/index.js.map +1 -1
  35. package/lib/module/rp/types.js +0 -20
  36. package/lib/module/rp/types.js.map +1 -1
  37. package/lib/module/trust/index.js +19 -5
  38. package/lib/module/trust/index.js.map +1 -1
  39. package/lib/module/trust/types.js +100 -7
  40. package/lib/module/trust/types.js.map +1 -1
  41. package/lib/module/utils/crypto.js +40 -0
  42. package/lib/module/utils/crypto.js.map +1 -0
  43. package/lib/module/utils/dpop.js +13 -5
  44. package/lib/module/utils/dpop.js.map +1 -1
  45. package/lib/module/wallet-instance-attestation/index.js +2 -2
  46. package/lib/module/wallet-instance-attestation/index.js.map +1 -1
  47. package/lib/module/wallet-instance-attestation/issuing.js +40 -58
  48. package/lib/module/wallet-instance-attestation/issuing.js.map +1 -1
  49. package/lib/typescript/index.d.ts +4 -6
  50. package/lib/typescript/index.d.ts.map +1 -1
  51. package/lib/typescript/pid/index.d.ts +1 -1
  52. package/lib/typescript/pid/index.d.ts.map +1 -1
  53. package/lib/typescript/pid/issuing.d.ts +43 -88
  54. package/lib/typescript/pid/issuing.d.ts.map +1 -1
  55. package/lib/typescript/rp/index.d.ts +41 -87
  56. package/lib/typescript/rp/index.d.ts.map +1 -1
  57. package/lib/typescript/rp/types.d.ts +10 -906
  58. package/lib/typescript/rp/types.d.ts.map +1 -1
  59. package/lib/typescript/sd-jwt/index.d.ts +1 -1
  60. package/lib/typescript/sd-jwt/index.d.ts.map +1 -1
  61. package/lib/typescript/trust/index.d.ts +806 -3
  62. package/lib/typescript/trust/index.d.ts.map +1 -1
  63. package/lib/typescript/trust/types.d.ts +9655 -297
  64. package/lib/typescript/trust/types.d.ts.map +1 -1
  65. package/lib/typescript/utils/crypto.d.ts +10 -0
  66. package/lib/typescript/utils/crypto.d.ts.map +1 -0
  67. package/lib/typescript/utils/dpop.d.ts +10 -2
  68. package/lib/typescript/utils/dpop.d.ts.map +1 -1
  69. package/lib/typescript/wallet-instance-attestation/index.d.ts +2 -2
  70. package/lib/typescript/wallet-instance-attestation/index.d.ts.map +1 -1
  71. package/lib/typescript/wallet-instance-attestation/issuing.d.ts +18 -31
  72. package/lib/typescript/wallet-instance-attestation/issuing.d.ts.map +1 -1
  73. package/lib/typescript/wallet-instance-attestation/types.d.ts +4 -4
  74. package/package.json +2 -2
  75. package/src/index.ts +14 -13
  76. package/src/pid/index.ts +1 -1
  77. package/src/pid/issuing.ts +233 -232
  78. package/src/rp/__test__/index.test.ts +3 -3
  79. package/src/rp/index.ts +172 -194
  80. package/src/rp/types.ts +0 -24
  81. package/src/sd-jwt/index.ts +1 -1
  82. package/src/trust/index.ts +106 -5
  83. package/src/trust/types.ts +152 -34
  84. package/src/utils/crypto.ts +41 -0
  85. package/src/utils/dpop.ts +17 -7
  86. package/src/wallet-instance-attestation/index.ts +2 -2
  87. package/src/wallet-instance-attestation/issuing.ts +51 -63
  88. package/lib/commonjs/pid/metadata.js +0 -49
  89. package/lib/commonjs/pid/metadata.js.map +0 -1
  90. package/lib/module/pid/metadata.js +0 -41
  91. package/lib/module/pid/metadata.js.map +0 -1
  92. package/lib/typescript/pid/metadata.d.ts +0 -482
  93. package/lib/typescript/pid/metadata.d.ts.map +0 -1
  94. package/src/pid/metadata.ts +0 -46
@@ -1,92 +1,65 @@
1
- import { decode as decodeJwt, verify as verifyJwt, sha256ToBase64 } from "@pagopa/io-react-native-jwt";
2
- import { SignJWT, thumbprint } from "@pagopa/io-react-native-jwt";
1
+ import { sha256ToBase64, SignJWT, thumbprint } from "@pagopa/io-react-native-jwt";
3
2
  import { JWK } from "../utils/jwk";
4
3
  import uuid from "react-native-uuid";
5
- import { PidIssuingError, PidMetadataError } from "../utils/errors";
6
- import { getUnsignedDPop } from "../utils/dpop";
7
- import { sign, generate, deleteKey } from "@pagopa/io-react-native-crypto";
8
- import { PidIssuerEntityConfiguration } from "./metadata";
9
- import { fixBase64EncodingOnKey } from "./../utils/jwk";
10
-
4
+ import { PidIssuingError } from "../utils/errors";
5
+ import { createDPopToken } from "../utils/dpop";
6
+ import * as WalletInstanceAttestation from "../wallet-instance-attestation";
7
+ import { generate, deleteKey } from "@pagopa/io-react-native-crypto";
8
+ import { SdJwt } from ".";
9
+ import { createCryptoContextFor } from "../utils/crypto";
11
10
  // This is a temporary type that will be used for demo purposes only
12
11
 
13
- export class Issuing {
14
- constructor(pidProviderBaseUrl, walletProviderBaseUrl, walletInstanceAttestation, clientId) {
15
- let appFetch = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : fetch;
16
- this.pidProviderBaseUrl = pidProviderBaseUrl;
17
- this.walletProviderBaseUrl = walletProviderBaseUrl;
18
- this.state = `${uuid.v4()}`;
19
- this.codeVerifier = `${uuid.v4()}`;
20
- this.authorizationCode = `${uuid.v4()}`;
21
- this.walletInstanceAttestation = walletInstanceAttestation;
22
- this.clientId = clientId;
23
- this.appFetch = appFetch;
24
- }
12
+ const assertionType = "urn:ietf:params:oauth:client-assertion-type:jwt-client-attestation";
25
13
 
26
- /**
27
- * Return the unsigned jwt to call the PAR request.
28
- *
29
- * @function
30
- * @param jwk The wallet instance attestation public JWK
31
- *
32
- * @returns Unsigned jwt
33
- *
34
- */
35
- async getUnsignedJwtForPar(jwk) {
36
- const parsedJwk = JWK.parse(jwk);
37
- const keyThumbprint = await thumbprint(parsedJwk);
38
- const publicKey = {
39
- ...parsedJwk,
14
+ /**
15
+ * Make a PAR request to the PID issuer and return the response url
16
+ */
17
+ const getPar = _ref => {
18
+ let {
19
+ wiaCryptoContext,
20
+ appFetch = fetch
21
+ } = _ref;
22
+ return async (clientId, codeVerifier, walletProviderBaseUrl, pidProviderEntityConfiguration, walletInstanceAttestation) => {
23
+ // Calculate the thumbprint of the public key of the Wallet Instance Attestation.
24
+ // The PAR request token is signed used the Wallet Instance Attestation key.
25
+ // The signature can be verified by reading the public key from the key set shippet with the it will ship the Wallet Instance Attestation;
26
+ // key is matched by its kid, which is supposed to be the thumbprint of its public key.
27
+ const keyThumbprint = await wiaCryptoContext.getPublicKey().then(JWK.parse).then(thumbprint);
28
+ const iss = WalletInstanceAttestation.decode(walletInstanceAttestation).payload.cnf.jwk.kid;
29
+ const codeChallenge = await sha256ToBase64(codeVerifier);
30
+ const signedJwtForPar = await new SignJWT(wiaCryptoContext).setProtectedHeader({
40
31
  kid: keyThumbprint
41
- };
42
- const codeChallenge = await sha256ToBase64(this.codeVerifier);
43
- const unsignedJwtForPar = new SignJWT({
44
- client_assertion_type: "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
32
+ }).setPayload({
33
+ iss,
34
+ aud: pidProviderEntityConfiguration.payload.iss,
35
+ jti: `${uuid.v4()}`,
36
+ client_assertion_type: assertionType,
45
37
  authorization_details: [{
46
- credentialDefinition: {
47
- type: ["eu.eudiw.pid.it"]
38
+ credential_definition: {
39
+ type: "PersonIdentificationData"
48
40
  },
49
41
  format: "vc+sd-jwt",
50
- type: "type"
42
+ type: "openid_credential"
51
43
  }],
52
44
  response_type: "code",
53
45
  code_challenge_method: "s256",
54
- redirect_uri: this.walletProviderBaseUrl,
55
- state: this.state,
56
- client_id: this.clientId,
46
+ redirect_uri: walletProviderBaseUrl,
47
+ state: `${uuid.v4()}`,
48
+ client_id: clientId,
57
49
  code_challenge: codeChallenge
58
- }).setProtectedHeader({
59
- alg: "ES256",
60
- kid: publicKey.kid
61
- }).setIssuedAt().setExpirationTime("1h").toSign();
62
- return unsignedJwtForPar;
63
- }
64
-
65
- /**
66
- * Make a PAR request to the PID issuer and return the response url
67
- *
68
- * @function
69
- * @param unsignedJwtForPar The unsigned JWT for PAR
70
- * @param signature The JWT for PAR signature
71
- *
72
- * @returns Unsigned PAR url
73
- *
74
- */
75
- async getPar(unsignedJwtForPar, signature) {
76
- const codeChallenge = await sha256ToBase64(this.codeVerifier);
77
- const signedJwtForPar = await SignJWT.appendSignature(unsignedJwtForPar, signature);
78
- const parUrl = new URL("/as/par", this.pidProviderBaseUrl).href;
50
+ }).setIssuedAt().setExpirationTime("1h").sign();
51
+ const parUrl = pidProviderEntityConfiguration.payload.metadata.openid_credential_issuer.pushed_authorization_request_endpoint;
79
52
  const requestBody = {
80
53
  response_type: "code",
81
- client_id: this.clientId,
54
+ client_id: clientId,
82
55
  code_challenge: codeChallenge,
83
56
  code_challenge_method: "S256",
84
- client_assertion_type: "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
85
- client_assertion: this.walletInstanceAttestation,
57
+ client_assertion_type: assertionType,
58
+ client_assertion: walletInstanceAttestation,
86
59
  request: signedJwtForPar
87
60
  };
88
61
  var formBody = new URLSearchParams(requestBody);
89
- const response = await this.appFetch(parUrl, {
62
+ const response = await appFetch(parUrl, {
90
63
  method: "POST",
91
64
  headers: {
92
65
  "Content-Type": "application/x-www-form-urlencoded"
@@ -98,55 +71,56 @@ export class Issuing {
98
71
  return result.request_uri;
99
72
  }
100
73
  throw new PidIssuingError(`Unable to obtain PAR. Response code: ${await response.text()}`);
101
- }
74
+ };
75
+ };
76
+
77
+ /**
78
+ * 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.
79
+ *
80
+ * @param params.wiaCryptoContext The key pair associated with the WIA. Will be use to prove the ownership of the attestation.
81
+ * @param params.appFetch (optional) Http client
82
+ * @param walletInstanceAttestation Wallet Instance Attestation token.
83
+ * @param walletProviderBaseUrl Base url for the Wallet Provider
84
+ * @param pidProviderEntityConfiguration The Entity Configuration of the PID Provider, from which discover public endooints.
85
+ * @returns The access token along with the values that identify the issuing session.
86
+ */
87
+ export const authorizeIssuing = _ref2 => {
88
+ let {
89
+ wiaCryptoContext,
90
+ appFetch = fetch
91
+ } = _ref2;
92
+ return async (walletInstanceAttestation, walletProviderBaseUrl, pidProviderEntityConfiguration) => {
93
+ // FIXME: do better
94
+ const clientId = await wiaCryptoContext.getPublicKey().then(_ => _.kid);
95
+ const codeVerifier = `${uuid.v4()}`;
96
+ const authorizationCode = `${uuid.v4()}`;
97
+ const tokenUrl = pidProviderEntityConfiguration.payload.metadata.openid_credential_issuer.token_endpoint;
98
+ await getPar({
99
+ wiaCryptoContext,
100
+ appFetch
101
+ })(clientId, codeVerifier, walletProviderBaseUrl, pidProviderEntityConfiguration, walletInstanceAttestation);
102
102
 
103
- /**
104
- * Return the unsigned jwt for a generic DPoP
105
- *
106
- * @function
107
- * @param jwk the public key for which the DPoP is to be created
108
- *
109
- * @returns Unsigned JWT for DPoP
110
- *
111
- */
112
- async getUnsignedDPoP(jwk) {
113
- const tokenUrl = new URL("/token", this.pidProviderBaseUrl).href;
114
- const dPop = getUnsignedDPop(fixBase64EncodingOnKey(jwk), {
103
+ // Use an ephemeral key to be destroyed after use
104
+ const keytag = `ephemeral-${uuid.v4()}`;
105
+ await generate(keytag);
106
+ const ephemeralContext = createCryptoContextFor(keytag);
107
+ const signedDPop = await createDPopToken({
115
108
  htm: "POST",
116
109
  htu: tokenUrl,
117
110
  jti: `${uuid.v4()}`
118
- });
119
- return dPop;
120
- }
121
-
122
- /**
123
- * Make an auth token request to the PID issuer
124
- *
125
- * @function
126
- * @returns a token response
127
- *
128
- */
129
- async getAuthToken() {
130
- //Generate fresh keys for DPoP
131
- const dPopKeyTag = `${uuid.v4()}`;
132
- const dPopKey = await generate(dPopKeyTag);
133
- const unsignedDPopForToken = await this.getUnsignedDPoP(dPopKey);
134
- const dPopTokenSignature = await sign(unsignedDPopForToken, dPopKeyTag);
135
- await deleteKey(dPopKeyTag);
136
- const signedDPop = await SignJWT.appendSignature(unsignedDPopForToken, dPopTokenSignature);
137
- const decodedJwtDPop = decodeJwt(signedDPop);
138
- const tokenUrl = decodedJwtDPop.payload.htu;
111
+ }, ephemeralContext);
112
+ await deleteKey(keytag);
139
113
  const requestBody = {
140
114
  grant_type: "authorization code",
141
- client_id: this.clientId,
142
- code: this.authorizationCode,
143
- code_verifier: this.codeVerifier,
144
- client_assertion_type: "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
145
- client_assertion: this.walletInstanceAttestation,
146
- redirect_uri: this.walletProviderBaseUrl
115
+ client_id: clientId,
116
+ code: authorizationCode,
117
+ code_verifier: codeVerifier,
118
+ client_assertion_type: assertionType,
119
+ client_assertion: walletInstanceAttestation,
120
+ redirect_uri: walletProviderBaseUrl
147
121
  };
148
122
  var formBody = new URLSearchParams(requestBody);
149
- const response = await this.appFetch(tokenUrl, {
123
+ const response = await appFetch(tokenUrl, {
150
124
  method: "POST",
151
125
  headers: {
152
126
  "Content-Type": "application/x-www-form-urlencoded",
@@ -155,51 +129,66 @@ export class Issuing {
155
129
  body: formBody.toString()
156
130
  });
157
131
  if (response.status === 200) {
158
- return await response.json();
132
+ const {
133
+ c_nonce,
134
+ access_token
135
+ } = await response.json();
136
+ return {
137
+ accessToken: access_token,
138
+ nonce: c_nonce,
139
+ clientId,
140
+ codeVerifier,
141
+ authorizationCode,
142
+ walletProviderBaseUrl
143
+ };
159
144
  }
160
145
  throw new PidIssuingError(`Unable to obtain token. Response code: ${await response.text()}`);
161
- }
146
+ };
147
+ };
162
148
 
163
- /**
164
- * Return the unsigned jwt for nonce proof of possession
165
- *
166
- * @function
167
- * @param nonce the nonce
168
- *
169
- * @returns Unsigned JWT for nonce proof
170
- *
171
- */
172
- async getUnsignedNonceProof(nonce) {
173
- const unsignedProof = new SignJWT({
174
- nonce
175
- }).setProtectedHeader({
176
- alg: "ES256",
177
- type: "openid4vci-proof+jwt"
178
- }).setAudience(this.walletProviderBaseUrl).setIssuer(this.clientId).setIssuedAt().setExpirationTime("1h").toSign();
179
- return unsignedProof;
180
- }
149
+ /**
150
+ * Return the signed jwt for nonce proof of possession
151
+ */
152
+ const createNonceProof = async (nonce, issuer, audience, ctx) => {
153
+ return new SignJWT(ctx).setPayload({
154
+ nonce,
155
+ jwk: await ctx.getPublicKey()
156
+ }).setProtectedHeader({
157
+ type: "openid4vci-proof+jwt"
158
+ }).setAudience(audience).setIssuer(issuer).setIssuedAt().setExpirationTime("1h").sign();
159
+ };
181
160
 
182
- /**
183
- * Make the credential issuing request to the PID issuer
184
- *
185
- * @function
186
- * @param unsignedDPopForPid The unsigned JWT for PID DPoP
187
- * @param dPopPidSignature The JWT for PID DPoP signature
188
- * @param unsignedNonceProof The unsigned JWT for nonce proof
189
- * @param nonceProofSignature The JWT for nonce proof signature
190
- * @param accessToken The access token obtained with getAuthToken
191
- * @param cieData Personal data read by the CIE
192
- *
193
- * @returns a credential
194
- *
195
- */
196
- async getCredential(unsignedDPopForPid, dPopPidSignature, unsignedNonceProof, nonceProofSignature, accessToken, cieData) {
197
- const signedDPopForPid = await SignJWT.appendSignature(unsignedDPopForPid, dPopPidSignature);
198
- const signedNonceProof = await SignJWT.appendSignature(unsignedNonceProof, nonceProofSignature);
199
- const credentialUrl = new URL("/credential", this.pidProviderBaseUrl).href;
161
+ /**
162
+ * Complete the issuing flow and get the PID credential.
163
+ *
164
+ * @param params.pidCryptoContext The key pair associated with the PID. Will be use to prove the ownership of the credential.
165
+ * @param params.appFetch (optional) Http client
166
+ * @param authConf The authorization configuration retrieved with the access token
167
+ * @param cieData Data red from the CIE login process
168
+ * @returns The PID credential token
169
+ */
170
+ export const getCredential = _ref3 => {
171
+ let {
172
+ pidCryptoContext,
173
+ appFetch = fetch
174
+ } = _ref3;
175
+ return async (_ref4, pidProviderEntityConfiguration, cieData) => {
176
+ let {
177
+ nonce,
178
+ accessToken,
179
+ clientId,
180
+ walletProviderBaseUrl
181
+ } = _ref4;
182
+ const signedDPopForPid = await createDPopToken({
183
+ htm: "POST",
184
+ htu: pidProviderEntityConfiguration.payload.metadata.openid_credential_issuer.token_endpoint,
185
+ jti: `${uuid.v4()}`
186
+ }, pidCryptoContext);
187
+ const signedNonceProof = await createNonceProof(nonce, clientId, walletProviderBaseUrl, pidCryptoContext);
188
+ const credentialUrl = pidProviderEntityConfiguration.payload.metadata.openid_credential_issuer.credential_endpoint;
200
189
  const requestBody = {
201
190
  credential_definition: JSON.stringify({
202
- type: ["eu.eudiw.pid.it"]
191
+ type: ["PersonIdentificationData"]
203
192
  }),
204
193
  format: "vc+sd-jwt",
205
194
  proof: JSON.stringify({
@@ -209,7 +198,7 @@ export class Issuing {
209
198
  })
210
199
  };
211
200
  const formBody = new URLSearchParams(requestBody);
212
- const response = await this.appFetch(credentialUrl, {
201
+ const response = await appFetch(credentialUrl, {
213
202
  method: "POST",
214
203
  headers: {
215
204
  "Content-Type": "application/x-www-form-urlencoded",
@@ -219,36 +208,19 @@ export class Issuing {
219
208
  body: formBody.toString()
220
209
  });
221
210
  if (response.status === 200) {
222
- return await response.json();
223
- }
224
- throw new PidIssuingError(`Unable to obtain credential!`);
225
- }
226
-
227
- /**
228
- * Obtain the PID issuer metadata
229
- *
230
- * @function
231
- * @returns PID issuer metadata
232
- *
233
- */
234
- async getEntityConfiguration() {
235
- const metadataUrl = new URL("ci/.well-known/openid-federation", this.pidProviderBaseUrl).href;
236
- const response = await this.appFetch(metadataUrl);
237
- if (response.status === 200) {
238
- const jwtMetadata = await response.text();
239
- const {
240
- payload
241
- } = decodeJwt(jwtMetadata);
242
- const result = PidIssuerEntityConfiguration.safeParse(payload);
243
- if (result.success) {
244
- const parsedMetadata = result.data;
245
- await verifyJwt(jwtMetadata, parsedMetadata.jwks.keys);
246
- return parsedMetadata;
247
- } else {
248
- throw new PidMetadataError(result.error.message);
249
- }
211
+ const pidResponse = await response.json();
212
+ await validatePid(pidResponse.credential, pidCryptoContext);
213
+ return pidResponse;
250
214
  }
251
- throw new PidMetadataError(`Unable to obtain PID metadata. Response: ${await response.text()} with status: ${response.status}`);
215
+ throw new PidIssuingError(`Unable to obtain credential! url=${credentialUrl} status=${response.status} body=${await response.text()}`);
216
+ };
217
+ };
218
+ const validatePid = async (pidJwt, pidCryptoContext) => {
219
+ const decoded = SdJwt.decode(pidJwt);
220
+ const pidKey = await pidCryptoContext.getPublicKey();
221
+ const holderBindedKey = decoded.sdJwt.payload.cnf.jwk;
222
+ if ((await thumbprint(pidKey)) !== (await thumbprint(holderBindedKey))) {
223
+ throw new PidIssuingError(`The obtained pid does not seem to be valid according to your configuration. Your PID public key is: ${JSON.stringify(pidKey)} but PID holder binded key is: ${JSON.stringify(holderBindedKey)}`);
252
224
  }
253
- }
225
+ };
254
226
  //# sourceMappingURL=issuing.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["decode","decodeJwt","verify","verifyJwt","sha256ToBase64","SignJWT","thumbprint","JWK","uuid","PidIssuingError","PidMetadataError","getUnsignedDPop","sign","generate","deleteKey","PidIssuerEntityConfiguration","fixBase64EncodingOnKey","Issuing","constructor","pidProviderBaseUrl","walletProviderBaseUrl","walletInstanceAttestation","clientId","appFetch","arguments","length","undefined","fetch","state","v4","codeVerifier","authorizationCode","getUnsignedJwtForPar","jwk","parsedJwk","parse","keyThumbprint","publicKey","kid","codeChallenge","unsignedJwtForPar","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","text","getUnsignedDPoP","tokenUrl","dPop","htm","htu","jti","getAuthToken","dPopKeyTag","dPopKey","unsignedDPopForToken","dPopTokenSignature","signedDPop","decodedJwtDPop","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","safeParse","success","parsedMetadata","data","jwks","keys","error","message"],"sourceRoot":"../../../src","sources":["pid/issuing.ts"],"mappings":"AAAA,SACEA,MAAM,IAAIC,SAAS,EACnBC,MAAM,IAAIC,SAAS,EACnBC,cAAc,QACT,6BAA6B;AAEpC,SAASC,OAAO,EAAEC,UAAU,QAAQ,6BAA6B;AACjE,SAASC,GAAG,QAAQ,cAAc;AAClC,OAAOC,IAAI,MAAM,mBAAmB;AACpC,SAASC,eAAe,EAAEC,gBAAgB,QAAQ,iBAAiB;AACnE,SAASC,eAAe,QAAQ,eAAe;AAC/C,SAASC,IAAI,E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,CAAC;EACH;AACF"}
1
+ {"version":3,"names":["sha256ToBase64","SignJWT","thumbprint","JWK","uuid","PidIssuingError","createDPopToken","WalletInstanceAttestation","generate","deleteKey","SdJwt","createCryptoContextFor","assertionType","getPar","_ref","wiaCryptoContext","appFetch","fetch","clientId","codeVerifier","walletProviderBaseUrl","pidProviderEntityConfiguration","walletInstanceAttestation","keyThumbprint","getPublicKey","then","parse","iss","decode","payload","cnf","jwk","kid","codeChallenge","signedJwtForPar","setProtectedHeader","setPayload","aud","jti","v4","client_assertion_type","authorization_details","credential_definition","type","format","response_type","code_challenge_method","redirect_uri","state","client_id","code_challenge","setIssuedAt","setExpirationTime","sign","parUrl","metadata","openid_credential_issuer","pushed_authorization_request_endpoint","requestBody","client_assertion","request","formBody","URLSearchParams","response","method","headers","body","toString","status","result","json","request_uri","text","authorizeIssuing","_ref2","_","authorizationCode","tokenUrl","token_endpoint","keytag","ephemeralContext","signedDPop","htm","htu","grant_type","code","code_verifier","DPoP","c_nonce","access_token","accessToken","nonce","createNonceProof","issuer","audience","ctx","setAudience","setIssuer","getCredential","_ref3","pidCryptoContext","_ref4","cieData","signedDPopForPid","signedNonceProof","credentialUrl","credential_endpoint","JSON","stringify","proof","jwt","proof_type","Authorization","pidResponse","validatePid","credential","pidJwt","decoded","pidKey","holderBindedKey","sdJwt"],"sourceRoot":"../../../src","sources":["pid/issuing.ts"],"mappings":"AAAA,SACEA,cAAc,EAEdC,OAAO,EACPC,UAAU,QACL,6BAA6B;AACpC,SAASC,GAAG,QAAQ,cAAc;AAClC,OAAOC,IAAI,MAAM,mBAAmB;AACpC,SAASC,eAAe,QAAQ,iBAAiB;AACjD,SAASC,eAAe,QAAQ,eAAe;AAE/C,OAAO,KAAKC,yBAAyB,MAAM,gCAAgC;AAC3E,SAASC,QAAQ,EAAEC,SAAS,QAAQ,gCAAgC;AACpE,SAASC,KAAK,QAAQ,GAAG;AACzB,SAASC,sBAAsB,QAAQ,iBAAiB;AACxD;;AAwBA,MAAMC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AW,GAAI,MAAMlD,QAAQ,CAACO,IAAI,CAAC,CAAiB;MAC1D,MAAM4C,WAAW,CAACD,WAAW,CAACE,UAAU,EAAEf,gBAAgB,CAAC;MAC3D,OAAOa,WAAW;IACpB;IAEA,MAAM,IAAI5G,eAAe,CACtB,oCAAmCoG,aAAc,WAChD1C,QAAQ,CAACK,MACV,SAAQ,MAAML,QAAQ,CAACS,IAAI,CAAC,CAAE,EACjC,CAAC;EACH,CAAC;AAAA;AAEH,MAAM0C,WAAW,GAAG,MAAAA,CAAOE,MAAc,EAAEhB,gBAA+B,KAAK;EAC7E,MAAMiB,OAAO,GAAG3G,KAAK,CAACkB,MAAM,CAACwF,MAAM,CAAC;EACpC,MAAME,MAAM,GAAG,MAAMlB,gBAAgB,CAAC5E,YAAY,CAAC,CAAC;EACpD,MAAM+F,eAAe,GAAGF,OAAO,CAACG,KAAK,CAAC3F,OAAO,CAACC,GAAG,CAACC,GAAG;EAErD,IAAI,CAAC,MAAM7B,UAAU,CAACoH,MAAM,CAAC,OAAO,MAAMpH,UAAU,CAACqH,eAAe,CAAC,CAAC,EAAE;IACtE,MAAM,IAAIlH,eAAe,CACtB,uGAAsGsG,IAAI,CAACC,SAAS,CACnHU,MACF,CAAE,kCAAiCX,IAAI,CAACC,SAAS,CAACW,eAAe,CAAE,EACrE,CAAC;EACH;AACF,CAAC"}
@@ -1,6 +1,6 @@
1
- import { RelyingPartySolution } from "..";
1
+ import { RelyingPartyEntityConfiguration } from "../../trust/types";
2
+ import * as RelyingPartySolution from "..";
2
3
  import { AuthRequestDecodeError } from "../../utils/errors";
3
- import { RpEntityConfiguration } from "../types";
4
4
  describe("decodeAuthRequestQR", () => {
5
5
  it("should return authentication request URL", async () => {
6
6
  const qrcode = "ZXVkaXc6Ly9hdXRob3JpemU/Y2xpZW50X2lkPWh0dHBzOi8vdmVyaWZpZXIuZXhhbXBsZS5vcmcmcmVxdWVzdF91cmk9aHR0cHM6Ly92ZXJpZmllci5leGFtcGxlLm9yZy9yZXF1ZXN0X3VyaQ==";
@@ -156,7 +156,7 @@ describe("RpEntityConfiguration", () => {
156
156
  authority_hints: ["https://demo.federation.eudi.wallet.developers.italia.it"]
157
157
  }
158
158
  };
159
- const result = RpEntityConfiguration.safeParse(pp);
159
+ const result = RelyingPartyEntityConfiguration.safeParse(pp);
160
160
  if (result.success === false) {
161
161
  throw result.error;
162
162
  }
@@ -1 +1 @@
1
- {"version":3,"names":["RelyingPartySolution","AuthRequestDecodeError","RpEntityConfiguration","describe","it","qrcode","result","decodeAuthRequestQR","expect","requestURI","toEqual","toThrowError","pp","header","alg","kid","typ","payload","exp","iat","iss","sub","jwks","keys","kty","e","n","metadata","federation_entity","organization_name","homepage_uri","policy_uri","logo_uri","contacts","wallet_relying_party","application_type","authorization_encrypted_response_alg","authorization_encrypted_response_enc","authorization_signed_response_alg","client_id","client_name","default_acr_values","default_max_age","id_token_encrypted_response_alg","id_token_encrypted_response_enc","id_token_signed_response_alg","presentation_definitions","id","input_descriptors","format","constraints","fields","filter","const","type","path","intent_to_retain","limit_disclosure","jwt","mso_mdoc","redirect_uris","request_uris","require_auth_time","subject_type","vp_formats","jwt_vp_json","crv","d","use","x","y","p","q","authority_hints","safeParse","success","error","toBe"],"sourceRoot":"../../../../src","sources":["rp/__test__/index.test.ts"],"mappings":"AAAA,SAASA,oBAAoB,QAAQ,IAAI;AACzC,SAASC,sBAAsB,QAAQ,oBAAoB;AAC3D,SAASC,qBAAqB,QAAQ,UAAU;AAEhDC,QAAQ,CAAC,qBAAqB,EAAE,MAAM;EACpCC,EAAE,CAAC,0CAA0C,EAAE,YAAY;IACzD,MAAMC,MAAM,GACV,sJAAsJ;IACxJ,MAAMC,MAAM,GAAGN,oBAAoB,CAACO,mBAAmB,CAACF,MAAM,CAAC;IAC/DG,MAAM,CAACF,MAAM,CAACG,UAAU,CAAC,CAACC,OAAO,CAC/B,0CACF,CAAC;EACH,CAAC,CAAC;EACFN,EAAE,CAAC,wCAAwC,EAAE,YAAY;I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cACE9C,GAAG,EAAE,KAAK;cACV2C,CAAC,EAAE,wVAAwV;cAC3V1C,CAAC,EAAE,MAAM;cACT2C,GAAG,EAAE,KAAK;cACVrD,GAAG,EAAE,6CAA6C;cAClDW,CAAC,EAAE,wVAAwV;cAC3V6C,CAAC,EAAE,6KAA6K;cAChLC,CAAC,EAAE;YACL,CAAC;UAEL;QACF,CAAC;QACDC,eAAe,EAAE,CACf,0DAA0D;MAE9D;IACF,CAAC;IACD,MAAMnE,MAAM,GAAGJ,qBAAqB,CAACwE,SAAS,CAAC9D,EAAE,CAAC;IAClD,IAAIN,MAAM,CAACqE,OAAO,KAAK,KAAK,EAAE;MAC5B,MAAMrE,MAAM,CAACsE,KAAK;IACpB;IACApE,MAAM,CAACF,MAAM,CAACqE,OAAO,CAAC,CAACE,IAAI,CAAC,IAAI,CAAC;EACnC,CAAC,CAAC;AACJ,CAAC,CAAC"}
1
+ {"version":3,"names":["RelyingPartyEntityConfiguration","RelyingPartySolution","AuthRequestDecodeError","describe","it","qrcode","result","decodeAuthRequestQR","expect","requestURI","toEqual","toThrowError","pp","header","alg","kid","typ","payload","exp","iat","iss","sub","jwks","keys","kty","e","n","metadata","federation_entity","organization_name","homepage_uri","policy_uri","logo_uri","contacts","wallet_relying_party","application_type","authorization_encrypted_response_alg","authorization_encrypted_response_enc","authorization_signed_response_alg","client_id","client_name","default_acr_values","default_max_age","id_token_encrypted_response_alg","id_token_encrypted_response_enc","id_token_signed_response_alg","presentation_definitions","id","input_descriptors","format","constraints","fields","filter","const","type","path","intent_to_retain","limit_disclosure","jwt","mso_mdoc","redirect_uris","request_uris","require_auth_time","subject_type","vp_formats","jwt_vp_json","crv","d","use","x","y","p","q","authority_hints","safeParse","success","error","toBe"],"sourceRoot":"../../../../src","sources":["rp/__test__/index.test.ts"],"mappings":"AAAA,SAASA,+BAA+B,QAAQ,mBAAmB;AACnE,OAAO,KAAKC,oBAAoB,MAAM,IAAI;AAC1C,SAASC,sBAAsB,QAAQ,oBAA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