@pagopa/io-react-native-wallet 0.6.1 → 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- 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
@@ -7,8 +7,17 @@ import * as WalletInstanceAttestation from "../wallet-instance-attestation";
|
|
7
7
|
import { generate, deleteKey } from "@pagopa/io-react-native-crypto";
|
8
8
|
import { SdJwt } from ".";
|
9
9
|
import { createCryptoContextFor } from "../utils/crypto";
|
10
|
+
import * as z from "zod";
|
11
|
+
import { getJwtFromFormPost } from "../utils/decoder";
|
12
|
+
|
10
13
|
// This is a temporary type that will be used for demo purposes only
|
11
14
|
|
15
|
+
const AuthenticationRequestResponse = z.object({
|
16
|
+
code: z.string(),
|
17
|
+
state: z.string(),
|
18
|
+
// TODO: refine to known paths using literals
|
19
|
+
iss: z.string()
|
20
|
+
});
|
12
21
|
const assertionType = "urn:ietf:params:oauth:client-assertion-type:jwt-client-attestation";
|
13
22
|
|
14
23
|
/**
|
@@ -74,31 +83,71 @@ const getPar = _ref => {
|
|
74
83
|
};
|
75
84
|
};
|
76
85
|
|
86
|
+
/**
|
87
|
+
* Make an authorization request
|
88
|
+
*/
|
89
|
+
const getAuthenticationRequest = _ref2 => {
|
90
|
+
let {
|
91
|
+
appFetch = fetch
|
92
|
+
} = _ref2;
|
93
|
+
return async (clientId, requestUri, pidProviderEntityConfiguration, cieData) => {
|
94
|
+
const authzRequestEndpoint = pidProviderEntityConfiguration.payload.metadata.openid_credential_issuer.authorization_endpoint;
|
95
|
+
|
96
|
+
/* User's personal data is not supposed to transit in this flow,
|
97
|
+
* but to be provided to the PID issuer directly by its chosen authentication method (CIE).
|
98
|
+
* Being the project in an initial phase, and being we were still unable to fully comply with authentication,
|
99
|
+
* we temporarily provide data from the App's logged user.
|
100
|
+
* */
|
101
|
+
const params = new URLSearchParams({
|
102
|
+
client_id: clientId,
|
103
|
+
request_uri: requestUri,
|
104
|
+
name: cieData.name,
|
105
|
+
surname: cieData.surname,
|
106
|
+
birth_date: cieData.birthDate,
|
107
|
+
fiscal_code: cieData.fiscalCode
|
108
|
+
});
|
109
|
+
const response = await appFetch(authzRequestEndpoint + "?" + params, {
|
110
|
+
method: "GET"
|
111
|
+
});
|
112
|
+
if (response.status === 200) {
|
113
|
+
const formData = await response.text();
|
114
|
+
const {
|
115
|
+
decodedJwt
|
116
|
+
} = await getJwtFromFormPost(formData);
|
117
|
+
const parsed = AuthenticationRequestResponse.parse(decodedJwt.payload);
|
118
|
+
return parsed;
|
119
|
+
}
|
120
|
+
throw new PidIssuingError(`Unable to obtain Authorization Request. Response code: ${await response.text()}`);
|
121
|
+
};
|
122
|
+
};
|
123
|
+
|
77
124
|
/**
|
78
125
|
* 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
126
|
*
|
80
127
|
* @param params.wiaCryptoContext The key pair associated with the WIA. Will be use to prove the ownership of the attestation.
|
81
128
|
* @param params.appFetch (optional) Http client
|
82
129
|
* @param walletInstanceAttestation Wallet Instance Attestation token.
|
83
|
-
* @param walletProviderBaseUrl Base url for the Wallet Provider
|
130
|
+
* @param walletProviderBaseUrl Base url for the Wallet Provider.
|
84
131
|
* @param pidProviderEntityConfiguration The Entity Configuration of the PID Provider, from which discover public endooints.
|
132
|
+
* @param cieData Data red from the CIE login process
|
85
133
|
* @returns The access token along with the values that identify the issuing session.
|
86
134
|
*/
|
87
|
-
export const authorizeIssuing =
|
135
|
+
export const authorizeIssuing = _ref3 => {
|
88
136
|
let {
|
89
137
|
wiaCryptoContext,
|
90
138
|
appFetch = fetch
|
91
|
-
} =
|
92
|
-
return async (walletInstanceAttestation, walletProviderBaseUrl, pidProviderEntityConfiguration) => {
|
139
|
+
} = _ref3;
|
140
|
+
return async (walletInstanceAttestation, walletProviderBaseUrl, pidProviderEntityConfiguration, cieData) => {
|
93
141
|
// FIXME: do better
|
94
142
|
const clientId = await wiaCryptoContext.getPublicKey().then(_ => _.kid);
|
95
143
|
const codeVerifier = `${uuid.v4()}`;
|
96
|
-
const authorizationCode = `${uuid.v4()}`;
|
97
144
|
const tokenUrl = pidProviderEntityConfiguration.payload.metadata.openid_credential_issuer.token_endpoint;
|
98
|
-
await getPar({
|
145
|
+
const requestUri = await getPar({
|
99
146
|
wiaCryptoContext,
|
100
147
|
appFetch
|
101
148
|
})(clientId, codeVerifier, walletProviderBaseUrl, pidProviderEntityConfiguration, walletInstanceAttestation);
|
149
|
+
const authenticationRequest = await getAuthenticationRequest({})(clientId, requestUri, pidProviderEntityConfiguration, cieData);
|
150
|
+
const authorizationCode = authenticationRequest.code;
|
102
151
|
|
103
152
|
// Use an ephemeral key to be destroyed after use
|
104
153
|
const keytag = `ephemeral-${uuid.v4()}`;
|
@@ -164,21 +213,20 @@ const createNonceProof = async (nonce, issuer, audience, ctx) => {
|
|
164
213
|
* @param params.pidCryptoContext The key pair associated with the PID. Will be use to prove the ownership of the credential.
|
165
214
|
* @param params.appFetch (optional) Http client
|
166
215
|
* @param authConf The authorization configuration retrieved with the access token
|
167
|
-
* @param cieData Data red from the CIE login process
|
168
216
|
* @returns The PID credential token
|
169
217
|
*/
|
170
|
-
export const getCredential =
|
218
|
+
export const getCredential = _ref4 => {
|
171
219
|
let {
|
172
220
|
pidCryptoContext,
|
173
221
|
appFetch = fetch
|
174
|
-
} =
|
175
|
-
return async (
|
222
|
+
} = _ref4;
|
223
|
+
return async (_ref5, pidProviderEntityConfiguration) => {
|
176
224
|
let {
|
177
225
|
nonce,
|
178
226
|
accessToken,
|
179
227
|
clientId,
|
180
228
|
walletProviderBaseUrl
|
181
|
-
} =
|
229
|
+
} = _ref5;
|
182
230
|
const signedDPopForPid = await createDPopToken({
|
183
231
|
htm: "POST",
|
184
232
|
htu: pidProviderEntityConfiguration.payload.metadata.openid_credential_issuer.token_endpoint,
|
@@ -193,7 +241,6 @@ export const getCredential = _ref3 => {
|
|
193
241
|
format: "vc+sd-jwt",
|
194
242
|
proof: JSON.stringify({
|
195
243
|
jwt: signedNonceProof,
|
196
|
-
cieData,
|
197
244
|
proof_type: "jwt"
|
198
245
|
})
|
199
246
|
};
|
@@ -1 +1 @@
|
|
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","
|
1
|
+
{"version":3,"names":["sha256ToBase64","SignJWT","thumbprint","JWK","uuid","PidIssuingError","createDPopToken","WalletInstanceAttestation","generate","deleteKey","SdJwt","createCryptoContextFor","z","getJwtFromFormPost","AuthenticationRequestResponse","object","code","string","state","iss","assertionType","getPar","_ref","wiaCryptoContext","appFetch","fetch","clientId","codeVerifier","walletProviderBaseUrl","pidProviderEntityConfiguration","walletInstanceAttestation","keyThumbprint","getPublicKey","then","parse","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","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","getAuthenticationRequest","_ref2","requestUri","cieData","authzRequestEndpoint","authorization_endpoint","params","name","surname","birth_date","birthDate","fiscal_code","fiscalCode","formData","decodedJwt","parsed","authorizeIssuing","_ref3","_","tokenUrl","token_endpoint","authenticationRequest","authorizationCode","keytag","ephemeralContext","signedDPop","htm","htu","grant_type","code_verifier","DPoP","c_nonce","access_token","accessToken","nonce","createNonceProof","issuer","audience","ctx","setAudience","setIssuer","getCredential","_ref4","pidCryptoContext","_ref5","signedDPopForPid","signedNonceProof","credentialUrl","credential_endpoint","JSON","stringify","proof","jwt","proof_type","Authorization","pidResponse","validatePid","credential","pidJwt","decoded","pidKey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jB,gBAAgB,CAAC1F,YAAY,CAAC,CAAC;EACpD,MAAM4G,eAAe,GAAGF,OAAO,CAACG,KAAK,CAACzG,OAAO,CAACC,GAAG,CAACC,GAAG;EAErD,IAAI,CAAC,MAAMpC,UAAU,CAACyI,MAAM,CAAC,OAAO,MAAMzI,UAAU,CAAC0I,eAAe,CAAC,CAAC,EAAE;IACtE,MAAM,IAAIvI,eAAe,CACtB,uGAAsG2H,IAAI,CAACC,SAAS,CACnHU,MACF,CAAE,kCAAiCX,IAAI,CAACC,SAAS,CAACW,eAAe,CAAE,EACrE,CAAC;EACH;AACF,CAAC"}
|
@@ -133,24 +133,26 @@ describe("RpEntityConfiguration", () => {
|
|
133
133
|
alg: ["EdDSA", "ES256K"]
|
134
134
|
}
|
135
135
|
},
|
136
|
-
jwks:
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
136
|
+
jwks: {
|
137
|
+
keys: [{
|
138
|
+
crv: "P-256",
|
139
|
+
d: "KzQBowMMoPmSZe7G8QsdEWc1IvR2nsgE8qTOYmMcLtc",
|
140
|
+
kid: "dDwPWXz5sCtczj7CJbqgPGJ2qQ83gZ9Sfs-tJyULi6s",
|
141
|
+
use: "sig",
|
142
|
+
kty: "EC",
|
143
|
+
x: "TSO-KOqdnUj5SUuasdlRB2VVFSqtJOxuR5GftUTuBdk",
|
144
|
+
y: "ByWgQt1wGBSnF56jQqLdoO1xKUynMY-BHIDB3eXlR7"
|
145
|
+
}, {
|
146
|
+
kty: "RSA",
|
147
|
+
d: "QUZsh1NqvpueootsdSjFQz-BUvxwd3Qnzm5qNb-WeOsvt3rWMEv0Q8CZrla2tndHTJhwioo1U4NuQey7znijhZ177bUwPPxSW1r68dEnL2U74nKwwoYeeMdEXnUfZSPxzs7nY6b7vtyCoA-AjiVYFOlgKNAItspv1HxeyGCLhLYhKvS_YoTdAeLuegETU5D6K1xGQIuw0nS13Icjz79Y8jC10TX4FdZwdX-NmuIEDP5-s95V9DMENtVqJAVE3L-wO-NdDilyjyOmAbntgsCzYVGH9U3W_djh4t3qVFCv3r0S-DA2FD3THvlrFi655L0QHR3gu_Fbj3b9Ybtajpue_Q",
|
148
|
+
e: "AQAB",
|
149
|
+
use: "enc",
|
150
|
+
kid: "9Cquk0X-fNPSdePQIgQcQZtD6J0IjIRrFigW2PPK_-w",
|
151
|
+
n: "utqtxbs-jnK0cPsV7aRkkZKA9t4S-WSZa3nCZtYIKDpgLnR_qcpeF0diJZvKOqXmj2cXaKFUE-8uHKAHo7BL7T-Rj2x3vGESh7SG1pE0thDGlXj4yNsg0qNvCXtk703L2H3i1UXwx6nq1uFxD2EcOE4a6qDYBI16Zl71TUZktJwmOejoHl16CPWqDLGo9GUSk_MmHOV20m4wXWkB4qbvpWVY8H6b2a0rB1B1YPOs5ZLYarSYZgjDEg6DMtZ4NgiwZ-4N1aaLwyO-GLwt9Vf-NBKwoxeRyD3zWE2FXRFBbhKGksMrCGnFDsNl5JTlPjaM3kYyImE941ggcuc495m-Fw",
|
152
|
+
p: "2zmGXIMCEHPphw778YjVTar1eycih6fFSJ4I4bl1iq167GqO0PjlOx6CZ1-OdBTVU7HfrYRiUK_BnGRdPDn-DQghwwkB79ZdHWL14wXnpB5y-boHz_LxvjsEqXtuQYcIkidOGaMG68XNT1nM4F9a8UKFr5hHYT5_UIQSwsxlRQ0",
|
153
|
+
q: "2jMFt2iFrdaYabdXuB4QMboVjPvbLA-IVb6_0hSG_-EueGBvgcBxdFGIZaG6kqHqlB7qMsSzdptU0vn6IgmCZnX-Hlt6c5X7JB_q91PZMLTO01pbZ2Bk58GloalCHnw_mjPh0YPviH5jGoWM5RHyl_HDDMI-UeLkzP7ImxGizrM"
|
154
|
+
}]
|
155
|
+
}
|
154
156
|
}
|
155
157
|
},
|
156
158
|
authority_hints: ["https://demo.federation.eudi.wallet.developers.italia.it"]
|
@@ -1 +1 @@
|
|
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,oBAAoB;AAE3DC,QAAQ,CAAC,qBAAqB,EAAE,MAAM;EACpCC,EAAE,CAAC,0CAA0C,EAAE,YAAY;IACzD,MAAMC,MAAM,GACV,sJAAsJ;IACxJ,MAAMC,MAAM,GAAGL,oBAAoB,CAACM,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,MAAMP,oBAAoB,CAACM,mBAAmB,CAACF,MAAM,CAAC,CAAC,CAACM,YAAY,CACzET,sBACF,CAAC;EACH,CAAC,CAAC;AACJ,CAAC,CAAC;AAEFC,QAAQ,CAA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C,IAAI,EAAE,CAAC,gBAAgB;oBACzB,CAAC,EACD;sBACEH,MAAM,EAAE;wBACNC,KAAK,EAAE,mBAAmB;wBAC1BC,IAAI,EAAE;sBACR,CAAC;sBACDC,IAAI,EAAE,CAAC,kBAAkB;oBAC3B,CAAC,EACD;sBACEC,gBAAgB,EAAE,OAAO;sBACzBD,IAAI,EAAE,CAAC,oBAAoB;oBAC7B,CAAC,EACD;sBACEC,gBAAgB,EAAE,OAAO;sBACzBD,IAAI,EAAE,CAAC,iBAAiB;oBAC1B,CAAC,EACD;sBACEC,gBAAgB,EAAE,OAAO;sBACzBD,IAAI,EAAE,CAAC,2BAA2B;oBACpC,CAAC,CACF;oBACDE,gBAAgB,EAAE;kBACpB,CAAC;kBACDE,QAAQ,EAAE;oBACR7C,GAAG,EAAE,CAAC,OAAO,EAAE,OAAO;kBACxB;gBACF,CAAC;gBACDiC,EAAE,EAAE;cACN,CAAC;YAEL,CAAC,CACF;YACDa,aAAa,EAAE,CACb,4EAA4E,CAC7E;YACDC,YAAY,EAAE,CACZ,2EAA2E,CAC5E;YACDC,iBAAiB,EAAE,IAAI;YACvBC,YAAY,EAAE,UAAU;YACxBC,UAAU,EAAE;cACVC,WAAW,EAAE;gBACXnD,GAAG,EAAE,CAAC,OAAO,EAAE,QAAQ;cACzB;YACF,CAAC;YACDQ,IAAI,EAAE,CACJ;
|
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,oBAAoB;AAE3DC,QAAQ,CAAC,qBAAqB,EAAE,MAAM;EACpCC,EAAE,CAAC,0CAA0C,EAAE,YAAY;IACzD,MAAMC,MAAM,GACV,sJAAsJ;IACxJ,MAAMC,MAAM,GAAGL,oBAAoB,CAACM,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,MAAMP,oBAAoB,CAACM,mBAAmB,CAACF,MAAM,CAAC,CAAC,CAACM,YAAY,CACzET,sBACF,CAAC;EACH,CAAC,CAAC;AACJ,CAAC,CAAC;AAEFC,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,6CAA6C;QAClDC,GAAG,EAAE;MACP,CAAC;MACDC,OAAO,EAAE;QACPC,GAAG,EAAE,UAAU;QACfC,GAAG,EAAE,UAAU;QACfC,GAAG,EAAE,+DAA+D;QACpEC,GAAG,EAAE,+DAA+D;QACpEC,IAAI,EAAE;UACJC,IAAI,EAAE,CACJ;YACEC,GAAG,EAAE,KAAK;YACVT,GAAG,EAAE,6CAA6C;YAClDU,CAAC,EAAE,MAAM;YAC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
CHANGED
@@ -14,7 +14,7 @@ import * as WalletInstanceAttestation from "../wallet-instance-attestation";
|
|
14
14
|
* @throws {NoSuitableKeysFoundInEntityConfiguration} If entity do not contain any public key suitable for encrypting
|
15
15
|
*/
|
16
16
|
const chooseRSAPublicKeyToEncrypt = entity => {
|
17
|
-
const [usingRsa256] = entity.payload.metadata.wallet_relying_party.jwks.filter(jwk => jwk.use === "enc" && jwk.kty === "RSA");
|
17
|
+
const [usingRsa256] = entity.payload.metadata.wallet_relying_party.jwks.keys.filter(jwk => jwk.use === "enc" && jwk.kty === "RSA");
|
18
18
|
if (usingRsa256) {
|
19
19
|
return usingRsa256;
|
20
20
|
}
|
@@ -81,7 +81,7 @@ export const getRequestObject = _ref => {
|
|
81
81
|
// verify token signature according to RP's entity configuration
|
82
82
|
// to ensure the request object is authentic
|
83
83
|
{
|
84
|
-
const pubKey = rpEntityConfiguration.payload.metadata.wallet_relying_party.jwks.find(_ref2 => {
|
84
|
+
const pubKey = rpEntityConfiguration.payload.metadata.wallet_relying_party.jwks.keys.find(_ref2 => {
|
85
85
|
let {
|
86
86
|
kid
|
87
87
|
} = _ref2;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["AuthRequestDecodeError","IoWalletError","NoSuitableKeysFoundInEntityConfiguration","decode","decodeJwt","decodeBase64","sha256ToBase64","SignJWT","EncryptJwe","verify","QRCodePayload","RequestObject","uuid","disclose","createDPopToken","WalletInstanceAttestation","chooseRSAPublicKeyToEncrypt","entity","usingRsa256","payload","metadata","wallet_relying_party","jwks","filter","jwk","use","kty","decodeAuthRequestQR","qrcode","decoded","decodedUrl","URL","protocol","resource","hostname","requestURI","searchParams","get","clientId","result","safeParse","success","data","error","message","getRequestObject","_ref","wiaCryptoContext","appFetch","fetch","walletInstanceAttestation","requestUri","rpEntityConfiguration","signedWalletInstanceDPoP","jti","v4","htm","htu","ath","response","method","headers","Authorization","DPoP","status","responseJson","json","responseEncodedJwt","responseJwt","pubKey","find","_ref2","kid","protectedHeader","requestObject","parse","header","text","prepareVpToken","_ref3","pidCryptoContext","_ref4","_ref5","vc","claims","token","vp","paths","iss","pidKid","getPublicKey","then","_","vp_token","setProtectedHeader","typ","setPayload","nonce","setAudience","response_uri","setIssuedAt","setExpirationTime","sign","vc_scope","scope","presentation_submission","definition_id","id","descriptor_map","map","p","path","format","sendAuthorizationResponse","_ref6","_ref7","presentation","authzResponsePayload","JSON","stringify","state","encrypted","alg","enc","encrypt","formBody","URLSearchParams","body","toString"],"sourceRoot":"../../../src","sources":["rp/index.ts"],"mappings":"AAAA,SACEA,sBAAsB,EACtBC,aAAa,EACbC,wCAAwC,QACnC,iBAAiB;AACxB,SACEC,MAAM,IAAIC,SAAS,EACnBC,YAAY,EACZC,cAAc,EACdC,OAAO,EACPC,UAAU,EACVC,MAAM,QAED,6BAA6B;AACpC,SAASC,aAAa,EAAEC,aAAa,QAA2B,SAAS;AAEzE,OAAOC,IAAI,MAAM,mBAAmB;AAEpC,SAASC,QAAQ,QAAQ,WAAW;AACpC,SAASC,eAAe,QAAQ,eAAe;AAE/C,OAAO,KAAKC,yBAAyB,MAAM,gCAAgC;;AAE3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,2BAA2B,GAC/BC,MAAuC,IAC/B;EACR,MAAM,CAACC,WAAW,CAAC,GACjBD,MAAM,CAACE,OAAO,CAACC,QAAQ,CAACC,oBAAoB,CAACC,IAAI,CAACC,MAAM,
|
1
|
+
{"version":3,"names":["AuthRequestDecodeError","IoWalletError","NoSuitableKeysFoundInEntityConfiguration","decode","decodeJwt","decodeBase64","sha256ToBase64","SignJWT","EncryptJwe","verify","QRCodePayload","RequestObject","uuid","disclose","createDPopToken","WalletInstanceAttestation","chooseRSAPublicKeyToEncrypt","entity","usingRsa256","payload","metadata","wallet_relying_party","jwks","keys","filter","jwk","use","kty","decodeAuthRequestQR","qrcode","decoded","decodedUrl","URL","protocol","resource","hostname","requestURI","searchParams","get","clientId","result","safeParse","success","data","error","message","getRequestObject","_ref","wiaCryptoContext","appFetch","fetch","walletInstanceAttestation","requestUri","rpEntityConfiguration","signedWalletInstanceDPoP","jti","v4","htm","htu","ath","response","method","headers","Authorization","DPoP","status","responseJson","json","responseEncodedJwt","responseJwt","pubKey","find","_ref2","kid","protectedHeader","requestObject","parse","header","text","prepareVpToken","_ref3","pidCryptoContext","_ref4","_ref5","vc","claims","token","vp","paths","iss","pidKid","getPublicKey","then","_","vp_token","setProtectedHeader","typ","setPayload","nonce","setAudience","response_uri","setIssuedAt","setExpirationTime","sign","vc_scope","scope","presentation_submission","definition_id","id","descriptor_map","map","p","path","format","sendAuthorizationResponse","_ref6","_ref7","presentation","authzResponsePayload","JSON","stringify","state","encrypted","alg","enc","encrypt","formBody","URLSearchParams","body","toString"],"sourceRoot":"../../../src","sources":["rp/index.ts"],"mappings":"AAAA,SACEA,sBAAsB,EACtBC,aAAa,EACbC,wCAAwC,QACnC,iBAAiB;AACxB,SACEC,MAAM,IAAIC,SAAS,EACnBC,YAAY,EACZC,cAAc,EACdC,OAAO,EACPC,UAAU,EACVC,MAAM,QAED,6BAA6B;AACpC,SAASC,aAAa,EAAEC,aAAa,QAA2B,SAAS;AAEzE,OAAOC,IAAI,MAAM,mBAAmB;AAEpC,SAASC,QAAQ,QAAQ,WAAW;AACpC,SAASC,eAAe,QAAQ,eAAe;AAE/C,OAAO,KAAKC,yBAAyB,MAAM,gCAAgC;;AAE3E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,2BAA2B,GAC/BC,MAAuC,IAC/B;EACR,MAAM,CAACC,WAAW,CAAC,GACjBD,MAAM,CAACE,OAAO,CAACC,QAAQ,CAACC,oBAAoB,CAACC,IAAI,CAACC,IAAI,CAACC,MAAM,CAC1DC,GAAG,IAAKA,GAAG,CAACC,GAAG,KAAK,KAAK,IAAID,GAAG,CAACE,GAAG,KAAK,KAC5C,CAAC;EAEH,IAAIT,WAAW,EAAE;IACf,OAAOA,WAAW;EACpB;;EAEA;EACA,MAAM,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AAG,CAAC;IAEf,MAAMqG,QAAQ,GAAG,IAAIC,eAAe,CAAC;MAAEnE,QAAQ,EAAE8D;IAAU,CAAC,CAAC;IAC7D,MAAMM,IAAI,GAAGF,QAAQ,CAACG,QAAQ,CAAC,CAAC;IAEhC,MAAMrE,QAAQ,GAAG,MAAMX,QAAQ,CAAC0B,aAAa,CAACxD,OAAO,CAACiF,YAAY,EAAE;MAClEvC,MAAM,EAAE,MAAM;MACdC,OAAO,EAAE;QACP,cAAc,EAAE;MAClB,CAAC;MACDkE;IACF,CAAC,CAAC;IAEF,IAAIpE,QAAQ,CAACK,MAAM,KAAK,GAAG,EAAE;MAC3B,OAAO,MAAML,QAAQ,CAACO,IAAI,CAAC,CAAC;IAC9B;IAEA,MAAM,IAAIlE,aAAa,CACpB,oDAAmD,MAAM2D,QAAQ,CAACkB,IAAI,CAAC,CAAE,eACxElB,QAAQ,CAACK,MACV,EACH,CAAC;EACH,CAAC;AAAA"}
|
@@ -134,7 +134,9 @@ export const RelyingPartyEntityConfiguration = BaseEntityConfiguration.and(z.obj
|
|
134
134
|
application_type: z.string().optional(),
|
135
135
|
client_id: z.string().optional(),
|
136
136
|
client_name: z.string().optional(),
|
137
|
-
jwks: z.
|
137
|
+
jwks: z.object({
|
138
|
+
keys: z.array(JWK)
|
139
|
+
}),
|
138
140
|
contacts: z.array(z.string()).optional()
|
139
141
|
}).passthrough()
|
140
142
|
})
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["UnixTime","JWK","z","TrustMark","object","id","string","trust_mark","CredentialDisplayMetadata","name","locale","logo","url","alt_text","background_color","text_color","SupportedCredentialMetadata","format","literal","cryptographic_binding_methods_supported","array","cryptographic_suites_supported","display","EntityStatement","header","typ","alg","kid","payload","iss","sub","jwks","keys","trust_marks","iat","number","exp","EntityConfigurationHeader","BaseEntityConfiguration","metadata","federation_entity","federation_fetch_endpoint","optional","federation_list_endpoint","federation_resolve_endpoint","federation_trust_mark_status_endpoint","federation_trust_mark_list_endpoint","homepage_uri","policy_uri","logo_uri","contacts","passthrough","authority_hints","TrustAnchorEntityConfiguration","CredentialIssuerEntityConfiguration","and","openid_credential_issuer","credential_issuer","authorization_endpoint","token_endpoint","pushed_authorization_request_endpoint","dpop_signing_alg_values_supported","credential_endpoint","credentials_supported","WalletProviderEntityConfiguration","wallet_provider","attested_security_context_values_supported","grant_types_supported","token_endpoint_auth_methods_supported","token_endpoint_auth_signing_alg_values_supported","RelyingPartyEntityConfiguration","wallet_relying_party","application_type","client_id","client_name","EntityConfiguration","union","description"],"sourceRoot":"../../../src","sources":["trust/types.ts"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,iBAAiB;AAC1C,SAASC,GAAG,QAAQ,cAAc;AAClC,OAAO,KAAKC,CAAC,MAAM,KAAK;AAExB,OAAO,MAAMC,SAAS,GAAGD,CAAC,CAACE,MAAM,CAAC;EAAEC,EAAE,EAAEH,CAAC,CAACI,MAAM,CAAC,CAAC;EAAEC,UAAU,EAAEL,CAAC,CAACI,MAAM,CAAC;AAAE,CAAC,CAAC;;AAG7E;AACA;AAEA,MAAME,yBAAyB,GAAGN,CAAC,CAACE,MAAM,CAAC;EACzCK,IAAI,EAAEP,CAAC,CAACI,MAAM,CAAC,CAAC;EAChBI,MAAM,EAAER,CAAC,CAACI,MAAM,CAAC,CAAC;EAClBK,IAAI,EAAET,CAAC,CAACE,MAAM,CAAC;IACbQ,GAAG,EAAEV,CAAC,CAACI,MAAM,CAAC,CAAC;IACfO,QAAQ,EAAEX,CAAC,CAACI,MAAM,CAAC;EACrB,CAAC,CAAC;EACFQ,gBAAgB,EAAEZ,CAAC,CAACI,MAAM,CAAC,CAAC;EAC5BS,UAAU,EAAEb,CAAC,CAACI,MAAM,CAAC;AACvB,CAAC,CAAC;;AAEF;;AAEA,MAAMU,2BAA2B,GAAGd,CAAC,CAACE,MAAM,CAAC;EAC3Ca,MAAM,EAAEf,CAAC,CAACgB,OAAO,CAAC,WAAW,CAAC;EAC9BC,uCAAuC,EA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E,CAAC,CAACI,MAAM,CAAC,CAAC,CAACoC,QAAQ,CAAC,CAAC;QAChCgC,WAAW,EAAExE,CAAC,CAACI,MAAM,CAAC,CAAC,CAACoC,QAAQ,CAAC,CAAC;QAClCX,IAAI,EAAE7B,CAAC,CAACkB,KAAK,CAACnB,GAAG,CAAC;
|
1
|
+
{"version":3,"names":["UnixTime","JWK","z","TrustMark","object","id","string","trust_mark","CredentialDisplayMetadata","name","locale","logo","url","alt_text","background_color","text_color","SupportedCredentialMetadata","format","literal","cryptographic_binding_methods_supported","array","cryptographic_suites_supported","display","EntityStatement","header","typ","alg","kid","payload","iss","sub","jwks","keys","trust_marks","iat","number","exp","EntityConfigurationHeader","BaseEntityConfiguration","metadata","federation_entity","federation_fetch_endpoint","optional","federation_list_endpoint","federation_resolve_endpoint","federation_trust_mark_status_endpoint","federation_trust_mark_list_endpoint","homepage_uri","policy_uri","logo_uri","contacts","passthrough","authority_hints","TrustAnchorEntityConfiguration","CredentialIssuerEntityConfiguration","and","openid_credential_issuer","credential_issuer","authorization_endpoint","token_endpoint","pushed_authorization_request_endpoint","dpop_signing_alg_values_supported","credential_endpoint","credentials_supported","WalletProviderEntityConfiguration","wallet_provider","attested_security_context_values_supported","grant_types_supported","token_endpoint_auth_methods_supported","token_endpoint_auth_signing_alg_values_supported","RelyingPartyEntityConfiguration","wallet_relying_party","application_type","client_id","client_name","EntityConfiguration","union","description"],"sourceRoot":"../../../src","sources":["trust/types.ts"],"mappings":"AAAA,SAASA,QAAQ,QAAQ,iBAAiB;AAC1C,SAASC,GAAG,QAAQ,cAAc;AAClC,OAAO,KAAKC,CAAC,MAAM,KAAK;AAExB,OAAO,MAAMC,SAAS,GAAGD,CAAC,CAACE,MAAM,CAAC;EAAEC,EAAE,EAAEH,CAAC,CAACI,MAAM,CAAC,CAAC;EAAEC,UAAU,EAAEL,CAAC,CAACI,MAAM,CAAC;AAAE,CAAC,CAAC;;AAG7E;AACA;AAEA,MAAME,yBAAyB,GAAGN,CAA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
|
2
|
+
import { ValidationFailed } from "./errors";
|
3
|
+
|
4
|
+
/*
|
5
|
+
* Decode a form_post.jwt and return the final JWT.
|
6
|
+
* The formData here is in form_post.jwt format as defined in
|
7
|
+
* JWT Secured Authorization Response Mode for OAuth 2.0 (JARM)
|
8
|
+
* HTTP/1.1 200 OK
|
9
|
+
* Content-Type: text/html;charset=UTF-8
|
10
|
+
* Cache-Control: no-cache, no-store
|
11
|
+
* Pragma: no-cache
|
12
|
+
*
|
13
|
+
* <html>
|
14
|
+
* <head><title>Submit This Form</title></head>
|
15
|
+
* <body onload="javascript:document.forms[0].submit()">
|
16
|
+
* <form method="post" action="https://client.example.com/cb">
|
17
|
+
* <input type="hidden" name="response"
|
18
|
+
* value="eyJhbGciOiJSUz....."/>
|
19
|
+
* </form>
|
20
|
+
* </body>
|
21
|
+
* </html>
|
22
|
+
*/
|
23
|
+
export const getJwtFromFormPost = async formData => {
|
24
|
+
const formPostRegex = /<input(.|\n)*value\s*=\s*"((.|\n)*)"(.|\n)*>/gm;
|
25
|
+
const lineExpressionRegex = /\r\n|\n\r|\n|\r|\s+/g;
|
26
|
+
const matches = formPostRegex.exec(formData);
|
27
|
+
if (matches && matches.length >= 2) {
|
28
|
+
const responseJwt = matches[2];
|
29
|
+
if (responseJwt) {
|
30
|
+
const jwt = responseJwt.replace(lineExpressionRegex, "");
|
31
|
+
const decodedJwt = await decodeJwt(jwt);
|
32
|
+
return {
|
33
|
+
jwt,
|
34
|
+
decodedJwt
|
35
|
+
};
|
36
|
+
}
|
37
|
+
}
|
38
|
+
throw new ValidationFailed(`Unable to obtain JWT from form_post.jwt. Form data: ${formData}`);
|
39
|
+
};
|
40
|
+
//# sourceMappingURL=decoder.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"names":["decode","decodeJwt","ValidationFailed","getJwtFromFormPost","formData","formPostRegex","lineExpressionRegex","matches","exec","length","responseJwt","jwt","replace","decodedJwt"],"sourceRoot":"../../../src","sources":["utils/decoder.ts"],"mappings":"AAAA,SAASA,MAAM,IAAIC,SAAS,QAAQ,6BAA6B;AAEjE,SAASC,gBAAgB,QAAQ,UAAU;;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,kBAAkB,GAAG,MAChCC,QAAgB,IAC0C;EAC1D,MAAMC,aAAa,GAAG,gDAAgD;EACtE,MAAMC,mBAAmB,GAAG,sBAAsB;EAElD,MAAMC,OAAO,GAAGF,aAAa,CAACG,IAAI,CAACJ,QAAQ,CAAC;EAC5C,IAAIG,OAAO,IAAIA,OAAO,CAACE,MAAM,IAAI,CAAC,EAAE;IAClC,MAAMC,WAAW,GAAGH,OAAO,CAAC,CAAC,CAAC;IAE9B,IAAIG,WAAW,EAAE;MACf,MAAMC,GAAG,GAAGD,WAAW,CAACE,OAAO,CAACN,mBAAmB,EAAE,EAAE,CAAC;MACxD,MAAMO,UAAU,GAAG,MAAMZ,SAAS,CAACU,GAAG,CAAC;MACvC,OAAO;QAAEA,GAAG;QAAEE;MAAW,CAAC;IAC5B;EACF;EAEA,MAAM,IAAIX,gBAAgB,CACvB,uDAAsDE,QAAS,EAClE,CAAC;AACH,CAAC"}
|
@@ -27,6 +27,36 @@ async function getAttestationRequest(wiaCryptoContext, walletProviderEntityConfi
|
|
27
27
|
}).setIssuedAt().setExpirationTime("1h").sign();
|
28
28
|
}
|
29
29
|
|
30
|
+
/**
|
31
|
+
* Validate a Wallet Instance Attestation token.
|
32
|
+
* Either return true or throw an exception.
|
33
|
+
*
|
34
|
+
* @param wia Signed Wallet Instance Attestation token
|
35
|
+
* @param walletProviderEntityConfiguration Entity Configuration object for the issuing Wallet Provider
|
36
|
+
* @returns The token is valid
|
37
|
+
* @throws {WalletInstanceAttestationIssuingError} When the received token fails to validate. This can happen due to invalid signature, expired token or malformed JWT token.
|
38
|
+
*/
|
39
|
+
async function verifyWalletInstanceAttestation(wia, walletProviderEntityConfiguration) {
|
40
|
+
const {
|
41
|
+
payload: {
|
42
|
+
sub,
|
43
|
+
metadata: {
|
44
|
+
wallet_provider: {
|
45
|
+
jwks: {
|
46
|
+
keys
|
47
|
+
}
|
48
|
+
}
|
49
|
+
}
|
50
|
+
}
|
51
|
+
} = walletProviderEntityConfiguration;
|
52
|
+
return verifyJwt(wia, keys, {
|
53
|
+
issuer: sub
|
54
|
+
}).then(_ => true).catch(ex => {
|
55
|
+
const reason = ex && ex instanceof Error ? ex.message : "unknown reason";
|
56
|
+
throw new WalletInstanceAttestationIssuingError("Unable to validate received wallet instance attestation", reason);
|
57
|
+
});
|
58
|
+
}
|
59
|
+
|
30
60
|
/**
|
31
61
|
* Request a Wallet Instance Attestation (WIA) to the Wallet provider
|
32
62
|
*
|
@@ -61,10 +91,12 @@ export const getAttestation = _ref => {
|
|
61
91
|
},
|
62
92
|
body: JSON.stringify(requestBody)
|
63
93
|
});
|
64
|
-
if (response.status
|
65
|
-
|
94
|
+
if (response.status !== 201) {
|
95
|
+
throw new WalletInstanceAttestationIssuingError("Unable to obtain wallet instance attestation from wallet provider", `Response code: ${response.status}`);
|
66
96
|
}
|
67
|
-
|
97
|
+
const wia = await response.text();
|
98
|
+
await verifyWalletInstanceAttestation(wia, walletProviderEntityConfiguration);
|
99
|
+
return wia;
|
68
100
|
};
|
69
101
|
};
|
70
102
|
//# sourceMappingURL=issuing.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"names":["decode","decodeJwt","verify","verifyJwt","SignJWT","thumbprint","JWK","fixBase64EncodingOnKey","WalletInstanceAttestationRequestJwt","uuid","WalletInstanceAttestationIssuingError","getAttestationRequest","wiaCryptoContext","walletProviderEntityConfiguration","jwk","getPublicKey","parsedJwk","parse","keyThumbprint","publicKey","kid","setPayload","iss","aud","payload","jti","v4","nonce","cnf","setProtectedHeader","typ","setIssuedAt","setExpirationTime","sign","getAttestation","_ref","appFetch","fetch","signedAttestationRequest","decodedRequest","parsedRequest","header","protectedHeader","tokenUrl","
|
1
|
+
{"version":3,"names":["decode","decodeJwt","verify","verifyJwt","SignJWT","thumbprint","JWK","fixBase64EncodingOnKey","WalletInstanceAttestationRequestJwt","uuid","WalletInstanceAttestationIssuingError","getAttestationRequest","wiaCryptoContext","walletProviderEntityConfiguration","jwk","getPublicKey","parsedJwk","parse","keyThumbprint","publicKey","kid","setPayload","iss","aud","payload","jti","v4","nonce","cnf","setProtectedHeader","typ","setIssuedAt","setExpirationTime","sign","verifyWalletInstanceAttestation","wia","sub","metadata","wallet_provider","jwks","keys","issuer","then","_","catch","ex","reason","Error","message","getAttestation","_ref","appFetch","fetch","signedAttestationRequest","decodedRequest","parsedRequest","header","protectedHeader","tokenUrl","token_endpoint","requestBody","grant_type","assertion","response","method","headers","body","JSON","stringify","status","text"],"sourceRoot":"../../../src","sources":["wallet-instance-attestation/issuing.ts"],"mappings":"AAAA,SAEEA,MAAM,IAAIC,SAAS,QACd,6BAA6B;AACpC,SAASC,MAAM,IAAIC,SAAS,QAAQ,6BAA6B;AACjE,SAASC,OAAO,EAAEC,UAAU,QAAQ,6BAA6B;AACjE,SAASC,GAAG,EAAEC,sBAAsB,QAAQ,cAAc;AAC1D,SAASC,mCAAmC,QAAQ,SAAS;AAC7D,OAAOC,IAAI,MAAM,mBAAmB;AACpC,SAASC,qCAAqC,QAAQ,iBAAiB;AAGvE,eAAeC,qBAAqBA,CAClCC,gBAA+B,EAC/BC,iCAAoE,EACnD;EACjB,MAAMC,GAAG,GAAG,MAAMF,gBAAgB,CAACG,YAAY,CAAC,CAAC;EACjD,MAAMC,SAAS,GAAGV,GAAG,CAACW,KAAK,CAACH,GAAG,CAAC;EAChC,MAAMI,aAAa,GAAG,MAAMb,UAAU,CAACW,SAAS,CAAC;EACjD,MAAMG,SAAS,GAAG;IAAE,GAAGH,SAAS;IAAEI,GAAG,EAAEF;EAAc,CAAC;EAEtD,OAAO,IAAId,OAAO,CAACQ,gBAAgB,CAAC,CACjCS,UAAU,CAAC;I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A,OACD,MACErC,iCAAoE,IAChD;IACpB,MAAMwC,wBAAwB,GAAG,MAAM1C,qBAAqB,CAC1DC,gBAAgB,EAChBC,iCACF,CAAC;IAED,MAAMyC,cAAc,GAAGrD,SAAS,CAACoD,wBAAwB,CAAC;IAC1D,MAAME,aAAa,GAAG/C,mCAAmC,CAACS,KAAK,CAAC;MAC9DO,OAAO,EAAE8B,cAAc,CAAC9B,OAAO;MAC/BgC,MAAM,EAAEF,cAAc,CAACG;IACzB,CAAC,CAAC;IACF,MAAMtC,SAAS,GAAGoC,aAAa,CAAC/B,OAAO,CAACI,GAAG,CAACd,GAAG;IAE/C,MAAMX,SAAS,CAACkD,wBAAwB,EAAElC,SAAS,CAAC;IAEpD,MAAMuC,QAAQ,GACZ7C,iCAAiC,CAACW,OAAO,CAACa,QAAQ,CAACC,eAAe,CAC/DqB,cAAc;IACnB,MAAMC,WAAW,GAAG;MAClBC,UAAU,EACR,oEAAoE;MACtEC,SAAS,EAAET;IACb,CAAC;IACD,MAAMU,QAAQ,GAAG,MAAMZ,QAAQ,CAACO,QAAQ,EAAE;MACxCM,MAAM,EAAE,MAAM;MACdC,OAAO,EAAE;QACP,cAAc,EAAE;MAClB,CAAC;MACDC,IAAI,EAAEC,IAAI,CAACC,SAAS,CAACR,WAAW;IAClC,CAAC,CAAC;IAEF,IAAIG,QAAQ,CAACM,MAAM,KAAK,GAAG,EAAE;MAC3B,MAAM,IAAI3D,qCAAqC,CAC7C,mEAAmE,EAClE,kBAAiBqD,QAAQ,CAACM,MAAO,EACpC,CAAC;IACH;IAEA,MAAMlC,GAAG,GAAG,MAAM4B,QAAQ,CAACO,IAAI,CAAC,CAAC;IAEjC,MAAMpC,+BAA+B,CACnCC,GAAG,EACHtB,iCACF,CAAC;IAED,OAAOsB,GAAG;EACZ,CAAC;AAAA"}
|
@@ -27,8 +27,9 @@ export type PidResponse = {
|
|
27
27
|
* @param params.wiaCryptoContext The key pair associated with the WIA. Will be use to prove the ownership of the attestation.
|
28
28
|
* @param params.appFetch (optional) Http client
|
29
29
|
* @param walletInstanceAttestation Wallet Instance Attestation token.
|
30
|
-
* @param walletProviderBaseUrl Base url for the Wallet Provider
|
30
|
+
* @param walletProviderBaseUrl Base url for the Wallet Provider.
|
31
31
|
* @param pidProviderEntityConfiguration The Entity Configuration of the PID Provider, from which discover public endooints.
|
32
|
+
* @param cieData Data red from the CIE login process
|
32
33
|
* @returns The access token along with the values that identify the issuing session.
|
33
34
|
*/
|
34
35
|
export declare const authorizeIssuing: ({ wiaCryptoContext, appFetch, }: {
|
@@ -37,14 +38,13 @@ export declare const authorizeIssuing: ({ wiaCryptoContext, appFetch, }: {
|
|
37
38
|
(input: RequestInfo, init?: RequestInit | undefined): Promise<Response>;
|
38
39
|
(input: RequestInfo, init?: RequestInit | undefined): Promise<Response>;
|
39
40
|
} | undefined;
|
40
|
-
}) => (walletInstanceAttestation: string, walletProviderBaseUrl: string, pidProviderEntityConfiguration: CredentialIssuerEntityConfiguration) => Promise<AuthorizationConf>;
|
41
|
+
}) => (walletInstanceAttestation: string, walletProviderBaseUrl: string, pidProviderEntityConfiguration: CredentialIssuerEntityConfiguration, cieData: CieData) => Promise<AuthorizationConf>;
|
41
42
|
/**
|
42
43
|
* Complete the issuing flow and get the PID credential.
|
43
44
|
*
|
44
45
|
* @param params.pidCryptoContext The key pair associated with the PID. Will be use to prove the ownership of the credential.
|
45
46
|
* @param params.appFetch (optional) Http client
|
46
47
|
* @param authConf The authorization configuration retrieved with the access token
|
47
|
-
* @param cieData Data red from the CIE login process
|
48
48
|
* @returns The PID credential token
|
49
49
|
*/
|
50
50
|
export declare const getCredential: ({ pidCryptoContext, appFetch, }: {
|
@@ -53,5 +53,5 @@ export declare const getCredential: ({ pidCryptoContext, appFetch, }: {
|
|
53
53
|
(input: RequestInfo, init?: RequestInit | undefined): Promise<Response>;
|
54
54
|
(input: RequestInfo, init?: RequestInit | undefined): Promise<Response>;
|
55
55
|
} | undefined;
|
56
|
-
}) => ({ nonce, accessToken, clientId, walletProviderBaseUrl }: AuthorizationConf, pidProviderEntityConfiguration: CredentialIssuerEntityConfiguration
|
56
|
+
}) => ({ nonce, accessToken, clientId, walletProviderBaseUrl }: AuthorizationConf, pidProviderEntityConfiguration: CredentialIssuerEntityConfiguration) => Promise<PidResponse>;
|
57
57
|
//# sourceMappingURL=issuing.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"issuing.d.ts","sourceRoot":"","sources":["../../../src/pid/issuing.ts"],"names":[],"mappings":";AAAA,OAAO,EAEL,KAAK,aAAa,EAGnB,MAAM,6BAA6B,CAAC;
|
1
|
+
{"version":3,"file":"issuing.d.ts","sourceRoot":"","sources":["../../../src/pid/issuing.ts"],"names":[],"mappings":";AAAA,OAAO,EAEL,KAAK,aAAa,EAGnB,MAAM,6BAA6B,CAAC;AAMrC,OAAO,EAAE,mCAAmC,EAAE,MAAM,gBAAgB,CAAC;AAUrE,MAAM,MAAM,OAAO,GAAG;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;IACrB,qBAAqB,EAAE,MAAM,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AA0JF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,gBAAgB;sBAKP,aAAa;;;;;kCAIJ,MAAM,yBACV,MAAM,kCACG,mCAAmC,WAC1D,OAAO,KACf,QAAQ,iBAAiB,CA6E3B,CAAC;AA0BJ;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa;sBAKJ,aAAa;;;;;gEAI0B,iBAAiB,kCAC1C,mCAAmC,KAClE,QAAQ,WAAW,CAsDrB,CAAC"}
|
@@ -35,8 +35,8 @@ export declare const RequestObject: z.ZodObject<{
|
|
35
35
|
exp: number;
|
36
36
|
client_id: string;
|
37
37
|
nonce: string;
|
38
|
-
response_type: "vp_token";
|
39
38
|
state: string;
|
39
|
+
response_type: "vp_token";
|
40
40
|
response_uri: string;
|
41
41
|
response_mode: "direct_post.jwt";
|
42
42
|
client_id_scheme: "entity_id";
|
@@ -47,8 +47,8 @@ export declare const RequestObject: z.ZodObject<{
|
|
47
47
|
exp: number;
|
48
48
|
client_id: string;
|
49
49
|
nonce: string;
|
50
|
-
response_type: "vp_token";
|
51
50
|
state: string;
|
51
|
+
response_type: "vp_token";
|
52
52
|
response_uri: string;
|
53
53
|
response_mode: "direct_post.jwt";
|
54
54
|
client_id_scheme: "entity_id";
|
@@ -67,8 +67,8 @@ export declare const RequestObject: z.ZodObject<{
|
|
67
67
|
exp: number;
|
68
68
|
client_id: string;
|
69
69
|
nonce: string;
|
70
|
-
response_type: "vp_token";
|
71
70
|
state: string;
|
71
|
+
response_type: "vp_token";
|
72
72
|
response_uri: string;
|
73
73
|
response_mode: "direct_post.jwt";
|
74
74
|
client_id_scheme: "entity_id";
|
@@ -87,8 +87,8 @@ export declare const RequestObject: z.ZodObject<{
|
|
87
87
|
exp: number;
|
88
88
|
client_id: string;
|
89
89
|
nonce: string;
|
90
|
-
response_type: "vp_token";
|
91
90
|
state: string;
|
91
|
+
response_type: "vp_token";
|
92
92
|
response_uri: string;
|
93
93
|
response_mode: "direct_post.jwt";
|
94
94
|
client_id_scheme: "entity_id";
|