@pagopa/io-react-native-wallet 0.4.3 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +98 -22
- package/lib/commonjs/index.js +12 -8
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/pid/index.js +3 -8
- package/lib/commonjs/pid/index.js.map +1 -1
- package/lib/commonjs/pid/issuing.js +152 -169
- package/lib/commonjs/pid/issuing.js.map +1 -1
- package/lib/commonjs/pid/metadata.js +28 -25
- package/lib/commonjs/pid/metadata.js.map +1 -1
- package/lib/commonjs/rp/__test__/index.test.js +5 -3
- package/lib/commonjs/rp/__test__/index.test.js.map +1 -1
- package/lib/commonjs/rp/index.js +158 -154
- package/lib/commonjs/rp/index.js.map +1 -1
- package/lib/commonjs/trust/types.js +9 -7
- package/lib/commonjs/trust/types.js.map +1 -1
- package/lib/commonjs/utils/crypto.js +46 -0
- package/lib/commonjs/utils/crypto.js.map +1 -0
- package/lib/commonjs/utils/dpop.js +14 -7
- package/lib/commonjs/utils/dpop.js.map +1 -1
- package/lib/commonjs/wallet-instance-attestation/index.js +3 -3
- package/lib/commonjs/wallet-instance-attestation/issuing.js +50 -60
- package/lib/commonjs/wallet-instance-attestation/issuing.js.map +1 -1
- package/lib/module/index.js +4 -3
- package/lib/module/index.js.map +1 -1
- package/lib/module/pid/index.js +1 -1
- package/lib/module/pid/index.js.map +1 -1
- package/lib/module/pid/issuing.js +151 -172
- package/lib/module/pid/issuing.js.map +1 -1
- package/lib/module/pid/metadata.js +28 -25
- package/lib/module/pid/metadata.js.map +1 -1
- package/lib/module/rp/__test__/index.test.js +1 -1
- package/lib/module/rp/__test__/index.test.js.map +1 -1
- package/lib/module/rp/index.js +155 -153
- package/lib/module/rp/index.js.map +1 -1
- package/lib/module/trust/types.js +7 -6
- package/lib/module/trust/types.js.map +1 -1
- package/lib/module/utils/crypto.js +40 -0
- package/lib/module/utils/crypto.js.map +1 -0
- package/lib/module/utils/dpop.js +13 -5
- package/lib/module/utils/dpop.js.map +1 -1
- package/lib/module/wallet-instance-attestation/index.js +2 -2
- package/lib/module/wallet-instance-attestation/index.js.map +1 -1
- package/lib/module/wallet-instance-attestation/issuing.js +48 -58
- package/lib/module/wallet-instance-attestation/issuing.js.map +1 -1
- package/lib/typescript/index.d.ts +4 -3
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/pid/index.d.ts +1 -1
- package/lib/typescript/pid/index.d.ts.map +1 -1
- package/lib/typescript/pid/issuing.d.ts +51 -87
- package/lib/typescript/pid/issuing.d.ts.map +1 -1
- package/lib/typescript/pid/metadata.d.ts +1338 -408
- package/lib/typescript/pid/metadata.d.ts.map +1 -1
- package/lib/typescript/rp/index.d.ts +48 -86
- package/lib/typescript/rp/index.d.ts.map +1 -1
- package/lib/typescript/rp/types.d.ts +413 -57
- package/lib/typescript/rp/types.d.ts.map +1 -1
- package/lib/typescript/sd-jwt/index.d.ts +1 -1
- package/lib/typescript/sd-jwt/index.d.ts.map +1 -1
- package/lib/typescript/trust/types.d.ts +1000 -274
- package/lib/typescript/trust/types.d.ts.map +1 -1
- package/lib/typescript/utils/crypto.d.ts +10 -0
- package/lib/typescript/utils/crypto.d.ts.map +1 -0
- package/lib/typescript/utils/dpop.d.ts +10 -2
- package/lib/typescript/utils/dpop.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/index.d.ts +2 -2
- package/lib/typescript/wallet-instance-attestation/index.d.ts.map +1 -1
- package/lib/typescript/wallet-instance-attestation/issuing.d.ts +17 -31
- package/lib/typescript/wallet-instance-attestation/issuing.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/index.ts +5 -3
- package/src/pid/index.ts +1 -1
- package/src/pid/issuing.ts +233 -226
- package/src/pid/metadata.ts +32 -27
- package/src/rp/__test__/index.test.ts +1 -1
- package/src/rp/index.ts +180 -188
- package/src/sd-jwt/index.ts +1 -1
- package/src/trust/types.ts +39 -32
- package/src/utils/crypto.ts +41 -0
- package/src/utils/dpop.ts +17 -7
- package/src/wallet-instance-attestation/index.ts +2 -2
- package/src/wallet-instance-attestation/issuing.ts +55 -62
@@ -1,46 +1,46 @@
|
|
1
|
-
import {
|
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
|
6
|
-
import {
|
7
|
-
import { sign, generate, deleteKey } from "@pagopa/io-react-native-crypto";
|
4
|
+
import { PidIssuingError } from "../utils/errors";
|
5
|
+
import { createDPopToken } from "../utils/dpop";
|
8
6
|
import { PidIssuerEntityConfiguration } from "./metadata";
|
9
|
-
import {
|
10
|
-
|
7
|
+
import { createCryptoContextFor, getEntityConfiguration as getGenericEntityConfiguration } from "..";
|
8
|
+
import { generate, deleteKey } from "@pagopa/io-react-native-crypto";
|
9
|
+
import { SdJwt } from ".";
|
11
10
|
// This is a temporary type that will be used for demo purposes only
|
12
11
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
}
|
12
|
+
/**
|
13
|
+
* Obtain the PID provider entity configuration.
|
14
|
+
*/
|
15
|
+
export const getEntityConfiguration = function () {
|
16
|
+
let {
|
17
|
+
appFetch = fetch
|
18
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
19
|
+
return async relyingPartyBaseUrl => {
|
20
|
+
return getGenericEntityConfiguration(relyingPartyBaseUrl, {
|
21
|
+
appFetch: appFetch
|
22
|
+
}).then(PidIssuerEntityConfiguration.parse);
|
23
|
+
};
|
24
|
+
};
|
25
25
|
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
26
|
+
/**
|
27
|
+
* Make a PAR request to the PID issuer and return the response url
|
28
|
+
*/
|
29
|
+
const getPar = _ref => {
|
30
|
+
let {
|
31
|
+
wiaCryptoContext,
|
32
|
+
appFetch = fetch
|
33
|
+
} = _ref;
|
34
|
+
return async (clientId, codeVerifier, walletProviderBaseUrl, pidProviderEntityConfiguration, walletInstanceAttestation) => {
|
35
|
+
// Calculate the thumbprint of the public key of the Wallet Instance Attestation.
|
36
|
+
// The PAR request token is signed used the Wallet Instance Attestation key.
|
37
|
+
// The signature can be verified by reading the public key from the key set shippet with the it will ship the Wallet Instance Attestation;
|
38
|
+
// key is matched by its kid, which is supposed to be the thumbprint of its public key.
|
39
|
+
const keyThumbprint = await wiaCryptoContext.getPublicKey().then(JWK.parse).then(thumbprint);
|
40
|
+
const codeChallenge = await sha256ToBase64(codeVerifier);
|
41
|
+
const signedJwtForPar = await new SignJWT(wiaCryptoContext).setProtectedHeader({
|
40
42
|
kid: keyThumbprint
|
41
|
-
}
|
42
|
-
const codeChallenge = await sha256ToBase64(this.codeVerifier);
|
43
|
-
const unsignedJwtForPar = new SignJWT({
|
43
|
+
}).setPayload({
|
44
44
|
client_assertion_type: "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
|
45
45
|
authorization_details: [{
|
46
46
|
credentialDefinition: {
|
@@ -51,42 +51,23 @@ export class Issuing {
|
|
51
51
|
}],
|
52
52
|
response_type: "code",
|
53
53
|
code_challenge_method: "s256",
|
54
|
-
redirect_uri:
|
55
|
-
state:
|
56
|
-
client_id:
|
54
|
+
redirect_uri: walletProviderBaseUrl,
|
55
|
+
state: `${uuid.v4()}`,
|
56
|
+
client_id: clientId,
|
57
57
|
code_challenge: codeChallenge
|
58
|
-
}).
|
59
|
-
|
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;
|
58
|
+
}).setIssuedAt().setExpirationTime("1h").sign();
|
59
|
+
const parUrl = pidProviderEntityConfiguration.payload.metadata.openid_credential_issuer.pushed_authorization_request_endpoint;
|
79
60
|
const requestBody = {
|
80
61
|
response_type: "code",
|
81
|
-
client_id:
|
62
|
+
client_id: clientId,
|
82
63
|
code_challenge: codeChallenge,
|
83
64
|
code_challenge_method: "S256",
|
84
65
|
client_assertion_type: "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
|
85
|
-
client_assertion:
|
66
|
+
client_assertion: walletInstanceAttestation,
|
86
67
|
request: signedJwtForPar
|
87
68
|
};
|
88
69
|
var formBody = new URLSearchParams(requestBody);
|
89
|
-
const response = await
|
70
|
+
const response = await appFetch(parUrl, {
|
90
71
|
method: "POST",
|
91
72
|
headers: {
|
92
73
|
"Content-Type": "application/x-www-form-urlencoded"
|
@@ -98,55 +79,56 @@ export class Issuing {
|
|
98
79
|
return result.request_uri;
|
99
80
|
}
|
100
81
|
throw new PidIssuingError(`Unable to obtain PAR. Response code: ${await response.text()}`);
|
101
|
-
}
|
82
|
+
};
|
83
|
+
};
|
84
|
+
|
85
|
+
/**
|
86
|
+
* 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.
|
87
|
+
*
|
88
|
+
* @param params.wiaCryptoContext The key pair associated with the WIA. Will be use to prove the ownership of the attestation.
|
89
|
+
* @param params.appFetch (optional) Http client
|
90
|
+
* @param walletInstanceAttestation Wallet Instance Attestation token.
|
91
|
+
* @param walletProviderBaseUrl Base url for the Wallet Provider
|
92
|
+
* @param pidProviderEntityConfiguration The Entity Configuration of the PID Provider, from which discover public endooints.
|
93
|
+
* @returns The access token along with the values that identify the issuing session.
|
94
|
+
*/
|
95
|
+
export const authorizeIssuing = _ref2 => {
|
96
|
+
let {
|
97
|
+
wiaCryptoContext,
|
98
|
+
appFetch = fetch
|
99
|
+
} = _ref2;
|
100
|
+
return async (walletInstanceAttestation, walletProviderBaseUrl, pidProviderEntityConfiguration) => {
|
101
|
+
// FIXME: do better
|
102
|
+
const clientId = await wiaCryptoContext.getPublicKey().then(_ => _.kid);
|
103
|
+
const codeVerifier = `${uuid.v4()}`;
|
104
|
+
const authorizationCode = `${uuid.v4()}`;
|
105
|
+
const tokenUrl = pidProviderEntityConfiguration.payload.metadata.openid_credential_issuer.token_endpoint;
|
106
|
+
await getPar({
|
107
|
+
wiaCryptoContext,
|
108
|
+
appFetch
|
109
|
+
})(clientId, codeVerifier, walletProviderBaseUrl, pidProviderEntityConfiguration, walletInstanceAttestation);
|
102
110
|
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
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), {
|
111
|
+
// Use an ephemeral key to be destroyed after use
|
112
|
+
const keytag = `ephemeral-${uuid.v4()}`;
|
113
|
+
await generate(keytag);
|
114
|
+
const ephemeralContext = createCryptoContextFor(keytag);
|
115
|
+
const signedDPop = await createDPopToken({
|
115
116
|
htm: "POST",
|
116
117
|
htu: tokenUrl,
|
117
118
|
jti: `${uuid.v4()}`
|
118
|
-
});
|
119
|
-
|
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;
|
119
|
+
}, ephemeralContext);
|
120
|
+
await deleteKey(keytag);
|
139
121
|
const requestBody = {
|
140
122
|
grant_type: "authorization code",
|
141
|
-
client_id:
|
142
|
-
code:
|
143
|
-
code_verifier:
|
123
|
+
client_id: clientId,
|
124
|
+
code: authorizationCode,
|
125
|
+
code_verifier: codeVerifier,
|
144
126
|
client_assertion_type: "urn:ietf:params:oauth:client-assertion-type:jwt-bearer",
|
145
|
-
client_assertion:
|
146
|
-
redirect_uri:
|
127
|
+
client_assertion: walletInstanceAttestation,
|
128
|
+
redirect_uri: walletProviderBaseUrl
|
147
129
|
};
|
148
130
|
var formBody = new URLSearchParams(requestBody);
|
149
|
-
const response = await
|
131
|
+
const response = await appFetch(tokenUrl, {
|
150
132
|
method: "POST",
|
151
133
|
headers: {
|
152
134
|
"Content-Type": "application/x-www-form-urlencoded",
|
@@ -155,48 +137,62 @@ export class Issuing {
|
|
155
137
|
body: formBody.toString()
|
156
138
|
});
|
157
139
|
if (response.status === 200) {
|
158
|
-
|
140
|
+
const {
|
141
|
+
c_nonce,
|
142
|
+
access_token
|
143
|
+
} = await response.json();
|
144
|
+
return {
|
145
|
+
accessToken: access_token,
|
146
|
+
nonce: c_nonce,
|
147
|
+
clientId,
|
148
|
+
codeVerifier,
|
149
|
+
authorizationCode,
|
150
|
+
walletProviderBaseUrl
|
151
|
+
};
|
159
152
|
}
|
160
153
|
throw new PidIssuingError(`Unable to obtain token. Response code: ${await response.text()}`);
|
161
|
-
}
|
154
|
+
};
|
155
|
+
};
|
162
156
|
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
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
|
-
}
|
157
|
+
/**
|
158
|
+
* Return the signed jwt for nonce proof of possession
|
159
|
+
*/
|
160
|
+
const createNonceProof = async (nonce, issuer, audience, ctx) => {
|
161
|
+
return new SignJWT(ctx).setPayload({
|
162
|
+
nonce
|
163
|
+
}).setProtectedHeader({
|
164
|
+
type: "openid4vci-proof+jwt"
|
165
|
+
}).setAudience(audience).setIssuer(issuer).setIssuedAt().setExpirationTime("1h").sign();
|
166
|
+
};
|
181
167
|
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
async
|
197
|
-
|
198
|
-
|
199
|
-
|
168
|
+
/**
|
169
|
+
* Complete the issuing flow and get the PID credential.
|
170
|
+
*
|
171
|
+
* @param params.pidCryptoContext The key pair associated with the PID. Will be use to prove the ownership of the credential.
|
172
|
+
* @param params.appFetch (optional) Http client
|
173
|
+
* @param authConf The authorization configuration retrieved with the access token
|
174
|
+
* @param cieData Data red from the CIE login process
|
175
|
+
* @returns The PID credential token
|
176
|
+
*/
|
177
|
+
export const getCredential = _ref3 => {
|
178
|
+
let {
|
179
|
+
pidCryptoContext,
|
180
|
+
appFetch = fetch
|
181
|
+
} = _ref3;
|
182
|
+
return async (_ref4, pidProviderEntityConfiguration, cieData) => {
|
183
|
+
let {
|
184
|
+
nonce,
|
185
|
+
accessToken,
|
186
|
+
clientId,
|
187
|
+
walletProviderBaseUrl
|
188
|
+
} = _ref4;
|
189
|
+
const signedDPopForPid = await createDPopToken({
|
190
|
+
htm: "POST",
|
191
|
+
htu: pidProviderEntityConfiguration.payload.metadata.openid_credential_issuer.token_endpoint,
|
192
|
+
jti: `${uuid.v4()}`
|
193
|
+
}, pidCryptoContext);
|
194
|
+
const signedNonceProof = await createNonceProof(nonce, clientId, walletProviderBaseUrl, pidCryptoContext);
|
195
|
+
const credentialUrl = pidProviderEntityConfiguration.payload.metadata.openid_credential_issuer.credential_endpoint;
|
200
196
|
const requestBody = {
|
201
197
|
credential_definition: JSON.stringify({
|
202
198
|
type: ["eu.eudiw.pid.it"]
|
@@ -209,7 +205,7 @@ export class Issuing {
|
|
209
205
|
})
|
210
206
|
};
|
211
207
|
const formBody = new URLSearchParams(requestBody);
|
212
|
-
const response = await
|
208
|
+
const response = await appFetch(credentialUrl, {
|
213
209
|
method: "POST",
|
214
210
|
headers: {
|
215
211
|
"Content-Type": "application/x-www-form-urlencoded",
|
@@ -219,36 +215,19 @@ export class Issuing {
|
|
219
215
|
body: formBody.toString()
|
220
216
|
});
|
221
217
|
if (response.status === 200) {
|
222
|
-
|
223
|
-
|
224
|
-
|
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
|
-
}
|
218
|
+
const pidResponse = await response.json();
|
219
|
+
await validatePid(pidResponse.credential, pidCryptoContext);
|
220
|
+
return pidResponse;
|
250
221
|
}
|
251
|
-
throw new
|
222
|
+
throw new PidIssuingError(`Unable to obtain credential! url=${credentialUrl} status=${response.status} body=${await response.text()}`);
|
223
|
+
};
|
224
|
+
};
|
225
|
+
const validatePid = async (pidJwt, pidCryptoContext) => {
|
226
|
+
const decoded = SdJwt.decode(pidJwt);
|
227
|
+
const pidKey = await pidCryptoContext.getPublicKey();
|
228
|
+
const holderBindedKey = decoded.sdJwt.payload.cnf.jwk;
|
229
|
+
if ((await thumbprint(pidKey)) !== (await thumbprint(holderBindedKey))) {
|
230
|
+
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
231
|
}
|
253
|
-
}
|
232
|
+
};
|
254
233
|
//# sourceMappingURL=issuing.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["
|
1
|
+
{"version":3,"names":["sha256ToBase64","SignJWT","thumbprint","JWK","uuid","PidIssuingError","createDPopToken","PidIssuerEntityConfiguration","createCryptoContextFor","getEntityConfiguration","getGenericEntityConfiguration","generate","deleteKey","SdJwt","appFetch","fetch","arguments","length","undefined","relyingPartyBaseUrl","then","parse","getPar","_ref","wiaCryptoContext","clientId","codeVerifier","walletProviderBaseUrl","pidProviderEntityConfiguration","walletInstanceAttestation","keyThumbprint","getPublicKey","codeChallenge","signedJwtForPar","setProtectedHeader","kid","setPayload","client_assertion_type","authorization_details","credentialDefinition","type","format","response_type","code_challenge_method","redirect_uri","state","v4","client_id","code_challenge","setIssuedAt","setExpirationTime","sign","parUrl","payload","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","jti","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","credential_definition","JSON","stringify","proof","jwt","proof_type","Authorization","pidResponse","validatePid","credential","pidJwt","decoded","decode","pidKey","holderBindedKey","sdJwt","cnf","jwk"],"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;AAC/C,SAASC,4BAA4B,QAAQ,YAAY;AACzD,SACEC,sBAAsB,EACtBC,sBAAsB,IAAIC,6BAA6B,QAClD,IAAI;AACX,SAASC,QAAQ,EAAEC,SAAS,QAAQ,gCAAgC;AACpE,SAASC,KAAK,QAAQ,GAAG;AACzB;;AAwBA;AACA;AACA;AACA,OAAO,MAAMJ,sBAAsB,GACjC,SAAAA,CAAA;EAAA,IAAC;IAAEK,QAAQ,GAAGC;EAA2C,CAAC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAAA,OAC/D,MACEG,mBAA2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,IAAI7G,eAAe,CACtB,oCAAmCoG,aAAc,WAChD3C,QAAQ,CAACK,MACV,SAAQ,MAAML,QAAQ,CAACS,IAAI,CAAC,CAAE,EACjC,CAAC;EACH,CAAC;AAAA;AAEH,MAAM4C,WAAW,GAAG,MAAAA,CAAOE,MAAc,EAAEjB,gBAA+B,KAAK;EAC7E,MAAMkB,OAAO,GAAGzG,KAAK,CAAC0G,MAAM,CAACF,MAAM,CAAC;EACpC,MAAMG,MAAM,GAAG,MAAMpB,gBAAgB,CAACrE,YAAY,CAAC,CAAC;EACpD,MAAM0F,eAAe,GAAGH,OAAO,CAACI,KAAK,CAACrE,OAAO,CAACsE,GAAG,CAACC,GAAG;EAErD,IAAI,CAAC,MAAM1H,UAAU,CAACsH,MAAM,CAAC,OAAO,MAAMtH,UAAU,CAACuH,eAAe,CAAC,CAAC,EAAE;IACtE,MAAM,IAAIpH,eAAe,CACtB,uGAAsGuG,IAAI,CAACC,SAAS,CACnHW,MACF,CAAE,kCAAiCZ,IAAI,CAACC,SAAS,CAACY,eAAe,CAAE,EACrE,CAAC;EACH;AACF,CAAC"}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { EntityConfiguration } from "../trust/types";
|
1
2
|
import { JWK } from "../utils/jwk";
|
2
3
|
import { z } from "zod";
|
3
4
|
export const PidDisplayMetadata = z.object({
|
@@ -10,32 +11,34 @@ export const PidDisplayMetadata = z.object({
|
|
10
11
|
background_color: z.string(),
|
11
12
|
text_color: z.string()
|
12
13
|
});
|
13
|
-
export const PidIssuerEntityConfiguration = z.object({
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
metadata: z.object({
|
18
|
-
openid_credential_issuer: z.object({
|
19
|
-
credential_issuer: z.string(),
|
20
|
-
authorization_endpoint: z.string(),
|
21
|
-
token_endpoint: z.string(),
|
22
|
-
pushed_authorization_request_endpoint: z.string(),
|
23
|
-
dpop_signing_alg_values_supported: z.array(z.string()),
|
24
|
-
credential_endpoint: z.string(),
|
25
|
-
credentials_supported: z.array(z.object({
|
26
|
-
format: z.literal("vc+sd-jwt"),
|
27
|
-
cryptographic_binding_methods_supported: z.array(z.string()),
|
28
|
-
cryptographic_suites_supported: z.array(z.string()),
|
29
|
-
display: z.array(PidDisplayMetadata)
|
30
|
-
}))
|
14
|
+
export const PidIssuerEntityConfiguration = EntityConfiguration.and(z.object({
|
15
|
+
payload: z.object({
|
16
|
+
jwks: z.object({
|
17
|
+
keys: z.array(JWK)
|
31
18
|
}),
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
19
|
+
metadata: z.object({
|
20
|
+
openid_credential_issuer: z.object({
|
21
|
+
credential_issuer: z.string(),
|
22
|
+
authorization_endpoint: z.string(),
|
23
|
+
token_endpoint: z.string(),
|
24
|
+
pushed_authorization_request_endpoint: z.string(),
|
25
|
+
dpop_signing_alg_values_supported: z.array(z.string()),
|
26
|
+
credential_endpoint: z.string(),
|
27
|
+
credentials_supported: z.array(z.object({
|
28
|
+
format: z.literal("vc+sd-jwt"),
|
29
|
+
cryptographic_binding_methods_supported: z.array(z.string()),
|
30
|
+
cryptographic_suites_supported: z.array(z.string()),
|
31
|
+
display: z.array(PidDisplayMetadata)
|
32
|
+
}))
|
33
|
+
}),
|
34
|
+
federation_entity: z.object({
|
35
|
+
organization_name: z.string(),
|
36
|
+
homepage_uri: z.string(),
|
37
|
+
policy_uri: z.string(),
|
38
|
+
tos_uri: z.string(),
|
39
|
+
logo_uri: z.string()
|
40
|
+
})
|
38
41
|
})
|
39
42
|
})
|
40
|
-
});
|
43
|
+
}));
|
41
44
|
//# sourceMappingURL=metadata.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["JWK","z","PidDisplayMetadata","object","name","string","locale","logo","url","alt_text","background_color","text_color","PidIssuerEntityConfiguration","jwks","keys","array","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","policy_uri","tos_uri","logo_uri"],"sourceRoot":"../../../src","sources":["pid/metadata.ts"],"mappings":"AAAA,SAASA,GAAG,QAAQ,cAAc;AAClC,SAASC,CAAC,QAAQ,KAAK;AAGvB,OAAO,MAAMC,kBAAkB,GAAGD,CAAC,CAACE,MAAM,CAAC;EACzCC,IAAI,EAAEH,CAAC,CAACI,MAAM,CAAC,CAAC;EAChBC,MAAM,EAAEL,CAAC,CAACI,MAAM,CAAC,CAAC;EAClBE,IAAI,EAAEN,CAAC,CAACE,MAAM,CAAC;IACbK,GAAG,EAAEP,CAAC,CAACI,MAAM,CAAC,CAAC;IACfI,QAAQ,EAAER,CAAC,CAACI,MAAM,CAAC;EACrB,CAAC,CAAC;EACFK,gBAAgB,EAAET,CAAC,CAACI,MAAM,CAAC,CAAC;EAC5BM,UAAU,EAAEV,CAAC,CAACI,MAAM,CAAC;AACvB,CAAC,CAAC;AAKF,OAAO,MAAMO,4BAA4B,
|
1
|
+
{"version":3,"names":["EntityConfiguration","JWK","z","PidDisplayMetadata","object","name","string","locale","logo","url","alt_text","background_color","text_color","PidIssuerEntityConfiguration","and","payload","jwks","keys","array","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","policy_uri","tos_uri","logo_uri"],"sourceRoot":"../../../src","sources":["pid/metadata.ts"],"mappings":"AAAA,SAASA,mBAAmB,QAAQ,gBAAgB;AACpD,SAASC,GAAG,QAAQ,cAAc;AAClC,SAASC,CAAC,QAAQ,KAAK;AAGvB,OAAO,MAAMC,kBAAkB,GAAGD,CAAC,CAACE,MAAM,CAAC;EACzCC,IAAI,EAAEH,CAAC,CAACI,MAAM,CAAC,CAAC;EAChBC,MAAM,EAAEL,CAA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5DyB,8BAA8B,EAAE7B,CAAC,CAACgB,KAAK,CAAChB,CAAC,CAACI,MAAM,CAAC,CAAC,CAAC;UACnD0B,OAAO,EAAE9B,CAAC,CAACgB,KAAK,CAACf,kBAAkB;QACrC,CAAC,CACH;MACF,CAAC,CAAC;MACF8B,iBAAiB,EAAE/B,CAAC,CAACE,MAAM,CAAC;QAC1B8B,iBAAiB,EAAEhC,CAAC,CAACI,MAAM,CAAC,CAAC;QAC7B6B,YAAY,EAAEjC,CAAC,CAACI,MAAM,CAAC,CAAC;QACxB8B,UAAU,EAAElC,CAAC,CAACI,MAAM,CAAC,CAAC;QACtB+B,OAAO,EAAEnC,CAAC,CAACI,MAAM,CAAC,CAAC;QACnBgC,QAAQ,EAAEpC,CAAC,CAACI,MAAM,CAAC;MACrB,CAAC;IACH,CAAC;EACH,CAAC;AACH,CAAC,CACH,CAAC"}
|
@@ -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,
|
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,OAAO,KAAKA,oBAAoB,MAAM,IAAI;AAC1C,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;IACvD,MAAMC,MAAM,GAAG,0BAA0B;IACzCG,MAAM,CAAC,MAAMR,oBAAoB,CAACO,mBAAmB,CAACF,MAAM,CAAC,CAAC,CAACM,YAAY,CACzEV,sBACF,CAAC;EACH,CAAC,CAAC;AACJ,CAAC,CAAC;AAEFE,QAAQ,CAAC,uBAAuB,EAAE,MAAM;EACtCC,EAAE,CAAC,2BAA2B,EAAE,YAAY;IAC1C,MAAMQ,EAAE,GAAG;MACTC,MAAM,EAAE;QACNC,GAAG,EAAE,OAAO;QACZC,GAAG,EAAE,6C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