@pagopa/io-react-native-wallet 0.14.0 → 0.15.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (48) hide show
  1. package/lib/commonjs/cie/manager.js +4 -4
  2. package/lib/commonjs/cie/manager.js.map +1 -1
  3. package/lib/commonjs/credential/issuance/04-complete-user-authorization.js +142 -21
  4. package/lib/commonjs/credential/issuance/04-complete-user-authorization.js.map +1 -1
  5. package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js +12 -4
  6. package/lib/commonjs/credential/issuance/07-verify-and-parse-credential.js.map +1 -1
  7. package/lib/commonjs/credential/issuance/index.js +14 -2
  8. package/lib/commonjs/credential/issuance/index.js.map +1 -1
  9. package/lib/commonjs/credential/issuance/types.js +9 -1
  10. package/lib/commonjs/credential/issuance/types.js.map +1 -1
  11. package/lib/commonjs/trust/types.js +5 -3
  12. package/lib/commonjs/trust/types.js.map +1 -1
  13. package/lib/commonjs/utils/decoder.js +28 -19
  14. package/lib/commonjs/utils/decoder.js.map +1 -1
  15. package/lib/module/cie/manager.js +4 -4
  16. package/lib/module/cie/manager.js.map +1 -1
  17. package/lib/module/credential/issuance/04-complete-user-authorization.js +140 -20
  18. package/lib/module/credential/issuance/04-complete-user-authorization.js.map +1 -1
  19. package/lib/module/credential/issuance/07-verify-and-parse-credential.js +12 -4
  20. package/lib/module/credential/issuance/07-verify-and-parse-credential.js.map +1 -1
  21. package/lib/module/credential/issuance/index.js +2 -2
  22. package/lib/module/credential/issuance/index.js.map +1 -1
  23. package/lib/module/credential/issuance/types.js +7 -0
  24. package/lib/module/credential/issuance/types.js.map +1 -1
  25. package/lib/module/trust/types.js +5 -3
  26. package/lib/module/trust/types.js.map +1 -1
  27. package/lib/module/utils/decoder.js +28 -19
  28. package/lib/module/utils/decoder.js.map +1 -1
  29. package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts +48 -6
  30. package/lib/typescript/credential/issuance/04-complete-user-authorization.d.ts.map +1 -1
  31. package/lib/typescript/credential/issuance/07-verify-and-parse-credential.d.ts +1 -0
  32. package/lib/typescript/credential/issuance/07-verify-and-parse-credential.d.ts.map +1 -1
  33. package/lib/typescript/credential/issuance/index.d.ts +3 -3
  34. package/lib/typescript/credential/issuance/index.d.ts.map +1 -1
  35. package/lib/typescript/credential/issuance/types.d.ts +10 -0
  36. package/lib/typescript/credential/issuance/types.d.ts.map +1 -1
  37. package/lib/typescript/trust/index.d.ts +14 -14
  38. package/lib/typescript/trust/types.d.ts +142 -142
  39. package/lib/typescript/trust/types.d.ts.map +1 -1
  40. package/lib/typescript/utils/decoder.d.ts.map +1 -1
  41. package/package.json +1 -1
  42. package/src/cie/manager.ts +4 -4
  43. package/src/credential/issuance/04-complete-user-authorization.ts +212 -20
  44. package/src/credential/issuance/07-verify-and-parse-credential.ts +14 -6
  45. package/src/credential/issuance/index.ts +10 -2
  46. package/src/credential/issuance/types.ts +7 -0
  47. package/src/trust/types.ts +8 -6
  48. package/src/utils/decoder.ts +28 -19
@@ -29,9 +29,9 @@ const startCieAndroid = (useCieUat, ciePin, onError, onEvent, cieAuthorizationUr
29
29
  await _reactNativeCie.default.startListeningNFC();
30
30
  onEvent(_component.CieEvent.waiting_card);
31
31
  }).catch(onError);
32
- } catch {
32
+ } catch (e) {
33
33
  onError(new _error.CieError({
34
- message: "Unable to start CIE NFC manager on iOS",
34
+ message: `Unable to start CIE NFC manager on Android: ${e}`,
35
35
  type: _error.CieErrorType.NFC_ERROR
36
36
  }));
37
37
  }
@@ -53,9 +53,9 @@ const startCieiOS = async (useCieUat, ciePin, onError, onEvent, cieAuthorization
53
53
  await _reactNativeCie.default.startListeningNFC();
54
54
  onEvent(_component.CieEvent.waiting_card);
55
55
  }).catch(onError);
56
- } catch {
56
+ } catch (e) {
57
57
  onError(new _error.CieError({
58
- message: "Unable to start CIE NFC manager on Android",
58
+ message: `Unable to start CIE NFC manager on iOS: ${e}`,
59
59
  type: _error.CieErrorType.NFC_ERROR
60
60
  }));
61
61
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNativeCie","_interopRequireDefault","require","_reactNative","_component","_error","obj","__esModule","default","BASE_UAT_URL","startCieAndroid","useCieUat","ciePin","onError","onEvent","cieAuthorizationUri","continueWithUrl","cieManager","removeAllListeners","start","then","handleCieEvent","e","console","error","CieError","message","onSuccess","handleCieSuccess","setPin","setAuthenticationUrl","enableLog","setCustomIdpUrl","getCieUatEndpoint","startListeningNFC","CieEvent","waiting_card","catch","type","CieErrorType","NFC_ERROR","exports","startCieiOS","event","reading","TAG_NOT_VALID","AUTHENTICATION_ERROR","PIN_LOCKED","PIN_ERROR","attemptsLeft","CERTIFICATE_ERROR","url","decodeURIComponent","Platform","select","ios","android"],"sourceRoot":"../../../src","sources":["cie/manager.ts"],"mappings":";;;;;;AAAA,IAAAA,eAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAAiD,SAAAD,uBAAAK,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEjD,MAAMG,YAAY,GAAG,0DAA0D;AAIxE,MAAMC,eAAe,GAAGA,CAC7BC,SAAkB,EAClBC,MAAc,EACdC,OAAgB,EAChBC,OAAmB,EACnBC,mBAA2B,EAC3BC,eAAgC,KAC7B;EACH,IAAI;IACFC,uBAAU,CAACC,kBAAkB,CAAC,CAAC;IAC/BD,uBAAU,CACPE,KAAK,CAAC,CAAC,CACPC,IAAI,CAAC,YAAY;MAChBH,uBAAU,CAACH,OAAO,CAACO,cAAc,CAACR,OAAO,EAAEC,OAAO,CAAC,CAAC;MACpDG,uBAAU,CAACJ,OAAO,CAAES,CAAQ,IAAK;QAC/BC,OAAO,CAACC,KAAK,CAACF,CAAC,CAAC;QAChB,OAAOT,OAAO,CAAC,IAAIY,eAAQ,CAAC;UAAEC,OAAO,EAAEJ,CAAC,CAACI;QAAQ,CAAC,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reactNativeCie","_interopRequireDefault","require","_reactNative","_component","_error","obj","__esModule","default","BASE_UAT_URL","startCieAndroid","useCieUat","ciePin","onError","onEvent","cieAuthorizationUri","continueWithUrl","cieManager","removeAllListeners","start","then","handleCieEvent","e","console","error","CieError","message","onSuccess","handleCieSuccess","setPin","setAuthenticationUrl","enableLog","setCustomIdpUrl","getCieUatEndpoint","startListeningNFC","CieEvent","waiting_card","catch","type","CieErrorType","NFC_ERROR","exports","startCieiOS","event","reading","TAG_NOT_VALID","AUTHENTICATION_ERROR","PIN_LOCKED","PIN_ERROR","attemptsLeft","CERTIFICATE_ERROR","url","decodeURIComponent","Platform","select","ios","android"],"sourceRoot":"../../../src","sources":["cie/manager.ts"],"mappings":";;;;;;AAAA,IAAAA,eAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAAiD,SAAAD,uBAAAK,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEjD,MAAMG,YAAY,GAAG,0DAA0D;AAIxE,MAAMC,eAAe,GAAGA,CAC7BC,SAAkB,EAClBC,MAAc,EACdC,OAAgB,EAChBC,OAAmB,EACnBC,mBAA2B,EAC3BC,eAAgC,KAC7B;EACH,IAAI;IACFC,uBAAU,CAACC,kBAAkB,CAAC,CAAC;IAC/BD,uBAAU,CACPE,KAAK,CAAC,CAAC,CACPC,IAAI,CAAC,YAAY;MAChBH,uBAAU,CAACH,OAAO,CAACO,cAAc,CAACR,OAAO,EAAEC,OAAO,CAAC,CAAC;MACpDG,uBAAU,CAACJ,OAAO,CAAES,CAAQ,IAAK;QAC/BC,OAAO,CAACC,KAAK,CAACF,CAAC,CAAC;QAChB,OAAOT,OAAO,CAAC,IAAIY,eAAQ,CAAC;UAAEC,OAAO,EAAEJ,CAAC,CAACI;QAAQ,C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,YAAY;EACrBD,OAAO,EAAE;AACX,CAAC,CAAC"}
@@ -3,12 +3,17 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.parseAuthRedirectUrl = exports.completeUserAuthorizationWithQueryMode = exports.completeUserAuthorizationWithFormPostJwtMode = void 0;
6
+ exports.parseAuthroizationResponse = exports.getRequestedCredentialToBePresented = exports.completeUserAuthorizationWithQueryMode = exports.completeUserAuthorizationWithFormPostJwtMode = void 0;
7
7
  var _auth = require("../../utils/auth");
8
8
  var _misc = require("../../utils/misc");
9
9
  var _parseUrl = _interopRequireDefault(require("parse-url"));
10
10
  var _errors = require("../../utils/errors");
11
11
  var _reactNative = require("react-native");
12
+ var _ioReactNativeJwt = require("@pagopa/io-react-native-jwt");
13
+ var _types = require("../presentation/types");
14
+ var _reactNativeUuid = _interopRequireDefault(require("react-native-uuid"));
15
+ var _types2 = require("./types");
16
+ var _decoder = require("../../../src/utils/decoder");
12
17
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
18
  /**
14
19
  * The interface of the phase to complete User authorization via strong identification when the response mode is "query" and the request credential is a PersonIdentificationData.
@@ -32,11 +37,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
32
37
  * @returns the authorization response which contains code, state and iss
33
38
  */
34
39
  const completeUserAuthorizationWithQueryMode = async (issuerRequestUri, clientId, issuerConf, idpHint, redirectUri, authorizationContext) => {
35
- /**
36
- * Starts the authorization flow which dependes on the response mode and the request credential.
37
- * If the response mode is "query" the authorization flow is handled differently via the authorization context which opens an in-app browser capable of catching the redirectSchema.
38
- * The form_post.jwt mode is not currently supported.
39
- */
40
40
  const authzRequestEndpoint = issuerConf.oauth_authorization_server.authorization_endpoint;
41
41
  const params = new URLSearchParams({
42
42
  client_id: clientId,
@@ -72,27 +72,148 @@ const completeUserAuthorizationWithQueryMode = async (issuerRequestUri, clientId
72
72
  throw new _errors.AuthorizationError("Invalid authentication redirect url");
73
73
  }
74
74
  }
75
- return parseAuthRedirectUrl(authRedirectUrl);
75
+ const query = (0, _parseUrl.default)(authRedirectUrl).query;
76
+ return parseAuthroizationResponse(query);
76
77
  };
78
+
79
+ /**
80
+ * WARNING: This function must be called after {@link startUserAuthorization}. The next function to be called is {@link completeUserAuthorizationWithFormPostJwtMode}.
81
+ * The interface of the phase to complete User authorization via presentation of existing credentials when the response mode is "form_post.jwt".
82
+ * It is used as a first step to complete the user authorization by obtaining the requested credential to be presented from the authorization server.
83
+ * The information is obtained by performing a GET request to the authorization endpoint with request_uri and client_id parameters.
84
+ * @param issuerRequestUri the URI of the issuer where the request is sent
85
+ * @param clientId Identifies the current client across all the requests of the issuing flow returned by {@link startUserAuthorization}
86
+ * @param issuerConf The issuer configuration returned by {@link evaluateIssuerTrust}
87
+ * @param appFetch (optional) fetch api implementation. Default: built-in fetch
88
+ * @throws {ValidationFailed} if an error while validating the response
89
+ * @returns the request object which contains the credential to be presented in order to obtain the requested credential
90
+ */
77
91
  exports.completeUserAuthorizationWithQueryMode = completeUserAuthorizationWithQueryMode;
78
- const parseAuthRedirectUrl = authRedirectUrl => {
79
- const urlParse = (0, _parseUrl.default)(authRedirectUrl);
80
- const authRes = _auth.AuthorizationResultShape.safeParse(urlParse.query);
81
- if (!authRes.success) {
82
- const authErr = _auth.AuthorizationErrorShape.safeParse(urlParse.query);
92
+ const getRequestedCredentialToBePresented = async function (issuerRequestUri, clientId, issuerConf) {
93
+ let appFetch = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : fetch;
94
+ const authzRequestEndpoint = issuerConf.oauth_authorization_server.authorization_endpoint;
95
+ const params = new URLSearchParams({
96
+ client_id: clientId,
97
+ request_uri: issuerRequestUri
98
+ });
99
+ const requestObject = await appFetch(`${authzRequestEndpoint}?${params.toString()}`, {
100
+ method: "GET"
101
+ }).then((0, _misc.hasStatus)(200)).then(res => res.text()).then(jws => (0, _ioReactNativeJwt.decode)(jws)).then(reqObj => _types.RequestObject.safeParse(reqObj.payload));
102
+ if (!requestObject.success) {
103
+ throw new _errors.ValidationFailed("Request Object validation failed", requestObject.error.message);
104
+ }
105
+ return requestObject.data;
106
+ };
107
+
108
+ /**
109
+ * WARNING: This function must be called after {@link startUserAuthorization}. The next function to be called is {@link completeUserAuthorizationWithFormPostJwtMode}.
110
+ * The interface of the phase to complete User authorization via presentation of existing credentials when the response mode is "form_post.jwt".
111
+ * It is used as a first step to complete the user authorization by obtaining the requested credential to be presented from the authorization server.
112
+ * The information is obtained by performing a GET request to the authorization endpoint with request_uri and client_id parameters.
113
+ * @param issuerRequestUri the URI of the issuer where the request is sent
114
+ * @param clientId Identifies the current client across all the requests of the issuing flow returned by {@link startUserAuthorization}
115
+ * @param issuerConf The issuer configuration returned by {@link evaluateIssuerTrust}
116
+ * @param context.walletInstanceAccestation the Wallet Instance's attestation to be presented
117
+ * @param context.pid the PID to be presented
118
+ * @param context.wiaCryptoContext The Wallet Instance's crypto context associated with the walletInstanceAttestation parameter
119
+ * @param context.pidCryptoContext The PID crypto context associated with the pid parameter
120
+ * @param context.appFetch (optional) fetch api implementation. Default: built-in fetch
121
+ * @throws {ValidationFailed} if an error while validating the response
122
+ * @returns the authorization response which contains code, state and iss
123
+ */
124
+ exports.getRequestedCredentialToBePresented = getRequestedCredentialToBePresented;
125
+ const completeUserAuthorizationWithFormPostJwtMode = async (requestObject, ctx) => {
126
+ const {
127
+ wiaCryptoContext,
128
+ pidCryptoContext,
129
+ pid,
130
+ walletInstanceAttestation,
131
+ appFetch = fetch
132
+ } = ctx;
133
+ const wiaWpToken = await new _ioReactNativeJwt.SignJWT(wiaCryptoContext).setProtectedHeader({
134
+ alg: "ES256",
135
+ typ: "JWT"
136
+ }).setPayload({
137
+ vp: walletInstanceAttestation,
138
+ jti: _reactNativeUuid.default.v4().toString(),
139
+ nonce: requestObject.nonce
140
+ }).setIssuedAt().setExpirationTime("5m").setAudience(requestObject.response_uri).sign();
141
+ const pidWpToken = await new _ioReactNativeJwt.SignJWT(pidCryptoContext).setProtectedHeader({
142
+ alg: "ES256",
143
+ typ: "JWT"
144
+ }).setPayload({
145
+ vp: pid,
146
+ jti: _reactNativeUuid.default.v4().toString(),
147
+ nonce: requestObject.nonce
148
+ }).setIssuedAt().setExpirationTime("5m").setAudience(requestObject.response_uri).sign();
149
+
150
+ /* The path parameter refers to the vp_token variable of the authzResponsePayload and must point to the plain credential which
151
+ * is cointaned in the `vp` property of the signed jwt token payload
152
+ */
153
+ const presentationSubmission = {
154
+ definition_id: `${_reactNativeUuid.default.v4()}`,
155
+ id: `${_reactNativeUuid.default.v4()}`,
156
+ descriptor_map: [{
157
+ id: "PersonIdentificationData",
158
+ path: "$.vp_token[0].vp",
159
+ format: "vc+sd-jwt"
160
+ }, {
161
+ id: "WalletAttestation",
162
+ path: "$.vp_token[1].vp",
163
+ format: "jwt"
164
+ }]
165
+ };
166
+ const authzResponsePayload = (0, _ioReactNativeJwt.encodeBase64)(JSON.stringify({
167
+ state: requestObject.state,
168
+ presentation_submission: presentationSubmission,
169
+ vp_token: [pidWpToken, wiaWpToken]
170
+ }));
171
+
172
+ // Note: according to the spec, the response should be encrypted with the public key of the RP however this is not implemented yet
173
+ // https://openid.net/specs/openid-4-verifiable-presentations-1_0.html#name-signed-and-encrypted-response
174
+ // const rsaPublicJwk = chooseRSAPublicKeyToEncrypt(rpConf);
175
+ // const encrypted = await new EncryptJwe(authzResponsePayload, {
176
+ // alg: "RSA-OAEP-256",
177
+ // enc: "A256CBC-HS512",
178
+ // kid: rsaPublicJwk.kid,
179
+ // }).encrypt(rsaPublicJwk);
180
+
181
+ const body = new URLSearchParams({
182
+ response: authzResponsePayload
183
+ }).toString();
184
+ const resUriRes = await appFetch(requestObject.response_uri, {
185
+ method: "POST",
186
+ headers: {
187
+ "Content-Type": "application/x-www-form-urlencoded"
188
+ },
189
+ body
190
+ }).then((0, _misc.hasStatus)(200)).then(reqUri => reqUri.json());
191
+ const responseUri = _types2.ResponseUriResultShape.safeParse(resUriRes);
192
+ if (!responseUri.success) {
193
+ throw new _errors.ValidationFailed("Response Uri validation failed", responseUri.error.message);
194
+ }
195
+ return await appFetch(responseUri.data.redirect_uri).then((0, _misc.hasStatus)(200)).then(res => res.text()).then(_decoder.getJwtFromFormPost).then(cbRes => parseAuthroizationResponse(cbRes.decodedJwt.payload));
196
+ };
197
+
198
+ /**
199
+ * Parse the authorization response and return the result which contains code, state and iss.
200
+ * @throws {AuthorizationError} if an error occurs during the parsing process
201
+ * @throws {AuthorizationIdpError} if an error occurs during the parsing process and the error is related to the IDP
202
+ * @param authRes the authorization response to be parsed
203
+ * @returns the authorization result which contains code, state and iss
204
+ */
205
+ exports.completeUserAuthorizationWithFormPostJwtMode = completeUserAuthorizationWithFormPostJwtMode;
206
+ const parseAuthroizationResponse = authRes => {
207
+ const authResParsed = _auth.AuthorizationResultShape.safeParse(authRes);
208
+ if (!authResParsed.success) {
209
+ const authErr = _auth.AuthorizationErrorShape.safeParse(authRes);
83
210
  if (!authErr.success) {
84
- throw new _errors.AuthorizationError(authRes.error.message); // an error occured while parsing the result and the error
211
+ throw new _errors.AuthorizationError(authResParsed.error.message); // an error occured while parsing the result and the error
85
212
  }
86
213
 
87
214
  throw new _errors.AuthorizationIdpError(authErr.data.error, authErr.data.error_description);
88
215
  }
89
- return authRes.data;
90
- };
91
-
92
- // TODO: SIW-1120 implement generic credential issuance flow
93
- exports.parseAuthRedirectUrl = parseAuthRedirectUrl;
94
- const completeUserAuthorizationWithFormPostJwtMode = () => {
95
- throw new Error("Not implemented");
216
+ return authResParsed.data;
96
217
  };
97
- exports.completeUserAuthorizationWithFormPostJwtMode = completeUserAuthorizationWithFormPostJwtMode;
218
+ exports.parseAuthroizationResponse = parseAuthroizationResponse;
98
219
  //# sourceMappingURL=04-complete-user-authorization.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_auth","require","_misc","_parseUrl","_interopRequireDefault","_errors","_reactNative","obj","__esModule","default","completeUserAuthorizationWithQueryMode","issuerRequestUri","clientId","issuerConf","idpHint","redirectUri","authorizationContext","authzRequestEndpoint","oauth_authorization_server","authorization_endpoint","params","URLSearchParams","client_id","request_uri","idphint","authUrl","authRedirectUrl","redirectSchema","URL","protocol","replace","authorize","catch","e","AuthorizationError","message","Linking","addEventListener","_ref","url","includes","openAuthUrlInBrowser","openURL","unitAuthRedirectIsNotUndefined","until","undefined","Promise","all","parseAuthRedirectUrl","exports","urlParse","parseUrl","authRes","AuthorizationResultShape","safeParse","query","success","authErr","AuthorizationErrorShape","error","AuthorizationIdpError","data","error_description","completeUserAuthorizationWithFormPostJwtMode","Error"],"sourceRoot":"../../../../src","sources":["credential/issuance/04-complete-user-authorization.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAMA,IAAAC,KAAA,GAAAD,OAAA;AAEA,IAAAE,SAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAEA,IAAAK,YAAA,GAAAL,OAAA;AAAuC,SAAAG,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEvC;AACA;AACA;;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMG,sCAA8E,GACzF,MAAAA,CACEC,gBAAgB,EAChBC,QAAQ,EACRC,UAAU,EACVC,OAAO,EACPC,WAAW,EACXC,oBAAoB,KACjB;EACH;AACJ;AACA;AACA;AACA;EACI,MAAMC,oBAAoB,GACxBJ,UAAU,CAACK,0BAA0B,CAACC,sBAAsB;EAC9D,MAAMC,MAAM,GAAG,IAAIC,eAAe,CAAC;IACjCC,SAAS,EAAEV,QAAQ;IACnBW,WAAW,EAAEZ,gBAAgB;IAC7Ba,OAAO,EAAEV;EACX,CAAC,CAAC;EACF,MAAMW,OAAO,GAAI,GAAER,oBAAqB,IAAGG,MAAO,EAAC;EACnD,IAA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,CAACH,OAAO,CAACI,OAAO,EAAE;IACpB,MAAMC,OAAO,GAAGC,6BAAuB,CAACJ,SAAS,CAACJ,QAAQ,CAACK,KAAK,CAAC;IACjE,IAAI,CAACE,OAAO,CAACD,OAAO,EAAE;MACpB,MAAM,IAAItB,0BAAkB,CAACkB,OAAO,CAACO,KAAK,CAACxB,OAAO,CAAC,CAAC,CAAC;IACvD;;IACA,MAAM,IAAIyB,6BAAqB,CAC7BH,OAAO,CAACI,IAAI,CAACF,KAAK,EAClBF,OAAO,CAACI,IAAI,CAACC,iBACf,CAAC;EACH;EACA,OAAOV,OAAO,CAACS,IAAI;AACrB,CAAC;;AAED;AAAAZ,OAAA,CAAAD,oBAAA,GAAAA,oBAAA;AACO,MAAMe,4CAA4C,GAAGA,CAAA,KAAM;EAChE,MAAM,IAAIC,KAAK,CAAC,iBAAiB,CAAC;AACpC,CAAC;AAACf,OAAA,CAAAc,4CAAA,GAAAA,4CAAA"}
1
+ {"version":3,"names":["_auth","require","_misc","_parseUrl","_interopRequireDefault","_errors","_reactNative","_ioReactNativeJwt","_types","_reactNativeUuid","_types2","_decoder","obj","__esModule","default","completeUserAuthorizationWithQueryMode","issuerRequestUri","clientId","issuerConf","idpHint","redirectUri","authorizationContext","authzRequestEndpoint","oauth_authorization_server","authorization_endpoint","params","URLSearchParams","client_id","request_uri","idphint","authUrl","authRedirectUrl","redirectSchema","URL","protocol","replace","authorize","catch","e","AuthorizationError","message","Linking","addEventListener","_ref","url","includes","openAuthUrlInBrowser","openURL","unitAuthRedirectIsNotUndefined","until","undefined","Promise","all","query","parseUrl","parseAuthroizationResponse","exports","getRequestedCredentialToBePresented","appFetch","arguments","length","fetch","requestObject","toString","method","then","hasStatus","res","text","jws","decode","reqObj","RequestObject","safeParse","payload","success","ValidationFailed","error","data","completeUserAuthorizationWithFormPostJwtMode","ctx","wiaCryptoContext","pidCryptoContext","pid","walletInstanceAttestation","wiaWpToken","SignJWT","setProtectedHeader","alg","typ","setPayload","vp","jti","uuid","v4","nonce","setIssuedAt","setExpirationTime","setAudience","response_uri","sign","pidWpToken","presentationSubmission","definition_id","id","descriptor_map","path","format","authzResponsePayload","encodeBase64","JSON","stringify","state","presentation_submission","vp_token","body","response","resUriRes","headers","reqUri","json","responseUri","ResponseUriResultShape","redirect_uri","getJwtFromFormPost","cbRes","decodedJwt","authRes","authResParsed","AuthorizationResultShape","authErr","AuthorizationErrorShape","AuthorizationIdpError","error_description"],"sourceRoot":"../../../../src","sources":["credential/issuance/04-complete-user-authorization.ts"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAMA,IAAAC,KAAA,GAAAD,OAAA;AAEA,IAAAE,SAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAMA,IAAAK,YAAA,GAAAL,OAAA;AACA,IAAAM,iBAAA,GAAAN,OAAA;AAMA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,gBAAA,GAAAL,sBAAA,CAAAH,OAAA;AACA,IAAAS,OAAA,GAAAT,OAAA;AACA,IAAAU,QAAA,GAAAV,OAAA;AAAgE,SAAAG,uBAAAQ,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEhE;AACA;AACA;;AA4BA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAMG,sCAA8E,GACzF,MAAAA,CACEC,gBAAgB,EAChBC,QAAQ,EACRC,UAAU,EACVC,OAAO,EACPC,WAAW,EACXC,oBAAoB,KACjB;EACH,MAAMC,oBAAoB,GACxBJ,UAAU,CAACK,0BAA0B,CAACC,sBAAsB;EAC9D,MAAMC,MAAM,GAAG,IAAIC,eAAe,CAAC;IACjCC,SAAS,EAAEV,QAAQ;IACnBW,WAAW,EAAEZ,gBAAgB;IAC7Ba,OAAO,EAAEV;EACX,CAAC,CAAC;EAC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2D,2BAAkB,CAAC,CACxB3D,IAAI,CAAE4D,KAAK,IAAKtE,0BAA0B,CAACsE,KAAK,CAACC,UAAU,CAACpD,OAAO,CAAC,CAAC;AAC1E,CAAC;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AANAlB,OAAA,CAAAuB,4CAAA,GAAAA,4CAAA;AAOO,MAAMxB,0BAA0B,GACrCwE,OAAgB,IACQ;EACxB,MAAMC,aAAa,GAAGC,8BAAwB,CAACxD,SAAS,CAACsD,OAAO,CAAC;EACjE,IAAI,CAACC,aAAa,CAACrD,OAAO,EAAE;IAC1B,MAAMuD,OAAO,GAAGC,6BAAuB,CAAC1D,SAAS,CAACsD,OAAO,CAAC;IAC1D,IAAI,CAACG,OAAO,CAACvD,OAAO,EAAE;MACpB,MAAM,IAAIpC,0BAAkB,CAACyF,aAAa,CAACnD,KAAK,CAACrC,OAAO,CAAC,CAAC,CAAC;IAC7D;;IACA,MAAM,IAAI4F,6BAAqB,CAC7BF,OAAO,CAACpD,IAAI,CAACD,KAAK,EAClBqD,OAAO,CAACpD,IAAI,CAACuD,iBACf,CAAC;EACH;EACA,OAAOL,aAAa,CAAClD,IAAI;AAC3B,CAAC;AAACtB,OAAA,CAAAD,0BAAA,GAAAA,0BAAA"}
@@ -11,11 +11,12 @@ var _sdJwt = require("../../sd-jwt");
11
11
 
12
12
  // handy alias
13
13
 
14
- const parseCredentialSdJwt = (credentials_supported, _ref) => {
14
+ const parseCredentialSdJwt = function (credentials_supported, _ref) {
15
15
  let {
16
16
  sdJwt,
17
17
  disclosures
18
18
  } = _ref;
19
+ let ignoreMissingAttributes = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
19
20
  const credentialSubject = credentials_supported[sdJwt.payload.vct];
20
21
  if (!credentialSubject) {
21
22
  throw new _errors.IoWalletError("Credential type not supported by the issuer");
@@ -25,6 +26,10 @@ const parseCredentialSdJwt = (credentials_supported, _ref) => {
25
26
  }
26
27
 
27
28
  // transfrom a record { key: value } in an iterable of pairs [key, value]
29
+ if (!credentialSubject.claims) {
30
+ throw new _errors.IoWalletError("Missing claims in the credential subject"); // TODO [SIW-1268]: should not be optional
31
+ }
32
+
28
33
  const attrDefinitions = Object.entries(credentialSubject.claims);
29
34
 
30
35
  // the key of the attribute defintion must match the disclosure's name
@@ -38,7 +43,9 @@ const parseCredentialSdJwt = (credentials_supported, _ref) => {
38
43
  if (attrsNotInDisclosures.length > 0) {
39
44
  const missing = attrsNotInDisclosures.map(_ => _[0 /* key */]).join(", ");
40
45
  const received = disclosures.map(_ => _[1 /* name */]).join(", ");
41
- throw new _errors.IoWalletError(`Some attributes are missing in the credential. Missing: [${missing}], received: [${received}]`);
46
+ if (!ignoreMissingAttributes) {
47
+ throw new _errors.IoWalletError(`Some attributes are missing in the credential. Missing: [${missing}], received: [${received}]`);
48
+ }
42
49
  }
43
50
 
44
51
  // attributes that are defined in the issuer configuration
@@ -122,10 +129,11 @@ async function verifyCredentialSdJwt(rawCredential, issuerKeys, holderBindingCon
122
129
 
123
130
  const verifyAndParseCredentialSdJwt = async (issuerConf, credential, _, _ref8) => {
124
131
  let {
125
- credentialCryptoContext
132
+ credentialCryptoContext,
133
+ ignoreMissingAttributes
126
134
  } = _ref8;
127
135
  const decoded = await verifyCredentialSdJwt(credential, issuerConf.openid_credential_issuer.jwks.keys, credentialCryptoContext);
128
- const parsedCredential = parseCredentialSdJwt(issuerConf.openid_credential_issuer.credential_configurations_supported, decoded);
136
+ const parsedCredential = parseCredentialSdJwt(issuerConf.openid_credential_issuer.credential_configurations_supported, decoded, ignoreMissingAttributes);
129
137
  return {
130
138
  parsedCredential
131
139
  };
@@ -1 +1 @@
1
- {"version":3,"names":["_errors","require","_types","_sdJwt","parseCredentialSdJwt","credentials_supported","_ref","sdJwt","disclosures","credentialSubject","payload","vct","IoWalletError","format","header","typ","attrDefinitions","Object","entries","claims","attrsNotInDisclosures","filter","_ref2","attrKey","some","_ref3","name","length","missing","map","_","join","received","definedValues","fromEntries","_ref4","_disclosures$find","definition","value","find","_ref5","display","reduce","names","_ref6","locale","undefinedValues","keys","includes","_ref7","key","verifyCredentialSdJwt","rawCredential","issuerKeys","holderBindingContext","decodedCredential","holderBindingKey","Promise","all","verifySdJwt","SdJwt4VC","getPublicKey","cnf","jwk","kid","verifyAndParseCredentialSdJwt","issuerConf","credential","_ref8","credentialCryptoContext","decoded","openid_credential_issuer","jwks","parsedCredential","credential_configurations_supported","verifyAndParseCredential","context","exports"],"sourceRoot":"../../../../src","sources":["credential/issuance/07-verify-and-parse-credential.ts"],"mappings":";;;;;;AAEA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAcA;;AAkBA;;AAKA,MAAMG,oBAAoB,GAAGA,CAE3BC,qBAAgI,EAAAC,IAAA,KAE3G;EAAA,IADrB;IAAEC,KAAK;IAAEC;EAAoC,CAAC,GAAAF,IAAA;EAE9C,MAAMG,iBAAiB,GAAGJ,qBAAqB,CAACE,KAAK,CAACG,OAAO,CAACC,GAAG,CAAC;EAElE,IAAI,CAACF,iBAAiB,EAAE;IACtB,MAAM,IAAIG,qBAAa,CAAC,6CAA6C,CAAC;EACxE;EAEA,IAAIH,iBAAiB,CAACI,MAAM,KAAKN,KAAK,CAACO,MAAM,CAACC,GAAG,EAAE;IACjD,MAAM,IAAIH,qBAAa,CACpB,gEAA+DH,iBAAiB,CAACI,MAAO,gBAAeN,KAAK,CAACO,MAAM,CAACC,GAAI,KAC3H,CAAC;EACH;;EAEA;EACA,MAAMC,eAAe,GAAGC,MAAM,CAACC,OAAO,CAACT,iBAAiB,CAACU,MAAM,CAAC;;EAEhE;EACA,MAAMC,qBAAqB,GAAGJ,eAAe,CAACK,MAAM,CAClDC,KAAA;IAAA,IAAC,CAACC,OAAO,CAAC,GAAAD,KAAA;IAAA,OAAK,CAACd,WAAW,CAACgB,IAAI,CAACC,KAAA;MAAA,IAAC,GAAGC,IAAI,CAAC,GAAAD,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AAG,CAACC,GAAG,CAACC,GAAI,EAC9H,CAAC;EACH;EAEA,OAAOT,iBAAiB;AAC1B;;AAEA;;AAQA,MAAMU,6BAAsD,GAAG,MAAAA,CAC7DC,UAAU,EACVC,UAAU,EACVrC,CAAC,EAAAsC,KAAA,KAEE;EAAA,IADH;IAAEC;EAAwB,CAAC,GAAAD,KAAA;EAE3B,MAAME,OAAO,GAAG,MAAMnB,qBAAqB,CACzCgB,UAAU,EACVD,UAAU,CAACK,wBAAwB,CAACC,IAAI,CAACzB,IAAI,EAC7CsB,uBACF,CAAC;EAED,MAAMI,gBAAgB,GAAGrE,oBAAoB,CAC3C8D,UAAU,CAACK,wBAAwB,CAACG,mCAAmC,EACvEJ,OACF,CAAC;EAED,OAAO;IAAEG;EAAiB,CAAC;AAC7B,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAME,wBAAkD,GAAG,MAAAA,CAChET,UAAU,EACVC,UAAU,EACVtD,MAAM,EACN+D,OAAO,KACJ;EACH,IAAI/D,MAAM,KAAK,WAAW,EAAE;IAC1B,OAAOoD,6BAA6B,CAClCC,UAAU,EACVC,UAAU,EACVtD,MAAM,EACN+D,OACF,CAAC;EACH;EAEA,MAAM,IAAIhE,qBAAa,CAAE,kCAAiCC,MAAO,EAAC,CAAC;AACrE,CAAC;AAACgE,OAAA,CAAAF,wBAAA,GAAAA,wBAAA"}
1
+ {"version":3,"names":["_errors","require","_types","_sdJwt","parseCredentialSdJwt","credentials_supported","_ref","sdJwt","disclosures","ignoreMissingAttributes","arguments","length","undefined","credentialSubject","payload","vct","IoWalletError","format","header","typ","claims","attrDefinitions","Object","entries","attrsNotInDisclosures","filter","_ref2","attrKey","some","_ref3","name","missing","map","_","join","received","definedValues","fromEntries","_ref4","_disclosures$find","definition","value","find","_ref5","display","reduce","names","_ref6","locale","undefinedValues","keys","includes","_ref7","key","verifyCredentialSdJwt","rawCredential","issuerKeys","holderBindingContext","decodedCredential","holderBindingKey","Promise","all","verifySdJwt","SdJwt4VC","getPublicKey","cnf","jwk","kid","verifyAndParseCredentialSdJwt","issuerConf","credential","_ref8","credentialCryptoContext","decoded","openid_credential_issuer","jwks","parsedCredential","credential_configurations_supported","verifyAndParseCredential","context","exports"],"sourceRoot":"../../../../src","sources":["credential/issuance/07-verify-and-parse-credential.ts"],"mappings":";;;;;;AAEA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAeA;;AAkBA;;AAKA,MAAMG,oBAAoB,GAAG,SAAAA,CAE3BC,qBAAgI,EAAAC,IAAA,EAG3G;EAAA,IAFrB;IAAEC,KAAK;IAAEC;EAAoC,CAAC,GAAAF,IAAA;EAAA,IAC9CG,uBAAgC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,KAAK;EAExC,MAAMG,iBAAiB,GAAGR,qBAAqB,CAACE,KAAK,CAACO,OAAO,CAACC,GAAG,CAAC;EAElE,IAAI,CAACF,iBAAiB,EAAE;IACtB,MAAM,IAAIG,qBAAa,CAAC,6CAA6C,CAAC;EACxE;EAEA,IAAIH,iBAAiB,CAACI,MAAM,KAAKV,KAAK,CAACW,MAAM,CAACC,GAAG,EAAE;IACjD,MAAM,IAAIH,qBAAa,CACpB,gEAA+DH,iBAAiB,CAACI,MAAO,gBAAeV,KAAK,CAACW,MAAM,CAACC,GAAI,KAC3H,CAAC;EACH;;EAEA;EACA,IAAI,CAACN,iBAAiB,CAACO,MAAM,EAAE;IAC7B,MAAM,IAAIJ,qBAAa,CAAC,0CAA0C,CAAC,CAAC,CAAC;EACvE;;EACA,MAAMK,eAAe,GAAGC,MAAM,CAACC,OAAO,CAACV,iBAAiB,CAACO,MAAM,CAAC;;EAEhE;EACA,MAAMI,qBAAqB,GAAGH,eAAe,CAACI,MAAM,CAClDC,KAAA;IAAA,IAAC,CAACC,OAAO,CAAC,G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gB,CAACQ,GAAG,EAAE;IACxD,MAAM,IAAInD,qBAAa,CACpB,kDAAiD2C,gBAAgB,CAACQ,GAAI,UAAST,iBAAiB,CAACnD,KAAK,CAACO,OAAO,CAACmD,GAAG,CAACC,GAAG,CAACC,GAAI,EAC9H,CAAC;EACH;EAEA,OAAOT,iBAAiB;AAC1B;;AAEA;;AAQA,MAAMU,6BAAsD,GAAG,MAAAA,CAC7DC,UAAU,EACVC,UAAU,EACVrC,CAAC,EAAAsC,KAAA,KAEE;EAAA,IADH;IAAEC,uBAAuB;IAAE/D;EAAwB,CAAC,GAAA8D,KAAA;EAEpD,MAAME,OAAO,GAAG,MAAMnB,qBAAqB,CACzCgB,UAAU,EACVD,UAAU,CAACK,wBAAwB,CAACC,IAAI,CAACzB,IAAI,EAC7CsB,uBACF,CAAC;EAED,MAAMI,gBAAgB,GAAGxE,oBAAoB,CAC3CiE,UAAU,CAACK,wBAAwB,CAACG,mCAAmC,EACvEJ,OAAO,EACPhE,uBACF,CAAC;EAED,OAAO;IAAEmE;EAAiB,CAAC;AAC7B,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAME,wBAAkD,GAAG,MAAAA,CAChET,UAAU,EACVC,UAAU,EACVrD,MAAM,EACN8D,OAAO,KACJ;EACH,IAAI9D,MAAM,KAAK,WAAW,EAAE;IAC1B,OAAOmD,6BAA6B,CAClCC,UAAU,EACVC,UAAU,EACVrD,MAAM,EACN8D,OACF,CAAC;EACH;EAEA,MAAM,IAAI/D,qBAAa,CAAE,kCAAiCC,MAAO,EAAC,CAAC;AACrE,CAAC;AAAC+D,OAAA,CAAAF,wBAAA,GAAAA,wBAAA"}
@@ -9,6 +9,12 @@ Object.defineProperty(exports, "authorizeAccess", {
9
9
  return _authorizeAccess.authorizeAccess;
10
10
  }
11
11
  });
12
+ Object.defineProperty(exports, "completeUserAuthorizationWithFormPostJwtMode", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _completeUserAuthorization.completeUserAuthorizationWithFormPostJwtMode;
16
+ }
17
+ });
12
18
  Object.defineProperty(exports, "completeUserAuthorizationWithQueryMode", {
13
19
  enumerable: true,
14
20
  get: function () {
@@ -21,16 +27,22 @@ Object.defineProperty(exports, "evaluateIssuerTrust", {
21
27
  return _evaluateIssuerTrust.evaluateIssuerTrust;
22
28
  }
23
29
  });
30
+ Object.defineProperty(exports, "getRequestedCredentialToBePresented", {
31
+ enumerable: true,
32
+ get: function () {
33
+ return _completeUserAuthorization.getRequestedCredentialToBePresented;
34
+ }
35
+ });
24
36
  Object.defineProperty(exports, "obtainCredential", {
25
37
  enumerable: true,
26
38
  get: function () {
27
39
  return _obtainCredential.obtainCredential;
28
40
  }
29
41
  });
30
- Object.defineProperty(exports, "parseAuthRedirectUrl", {
42
+ Object.defineProperty(exports, "parseAuthroizationResponse", {
31
43
  enumerable: true,
32
44
  get: function () {
33
- return _completeUserAuthorization.parseAuthRedirectUrl;
45
+ return _completeUserAuthorization.parseAuthroizationResponse;
34
46
  }
35
47
  });
36
48
  Object.defineProperty(exports, "startUserAuthorization", {
@@ -1 +1 @@
1
- {"version":3,"names":["_evaluateIssuerTrust","require","_startUserAuthorization","_completeUserAuthorization","_authorizeAccess","_obtainCredential","_verifyAndParseCredential"],"sourceRoot":"../../../../src","sources":["credential/issuance/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,oBAAA,GAAAC,OAAA;AAIA,IAAAC,uBAAA,GAAAD,OAAA;AAIA,IAAAE,0BAAA,GAAAF,OAAA;AAKA,IAAAG,gBAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAJ,OAAA;AAIA,IAAAK,yBAAA,GAAAL,OAAA"}
1
+ {"version":3,"names":["_evaluateIssuerTrust","require","_startUserAuthorization","_completeUserAuthorization","_authorizeAccess","_obtainCredential","_verifyAndParseCredential"],"sourceRoot":"../../../../src","sources":["credential/issuance/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,IAAAA,oBAAA,GAAAC,OAAA;AAIA,IAAAC,uBAAA,GAAAD,OAAA;AAIA,IAAAE,0BAAA,GAAAF,OAAA;AASA,IAAAG,gBAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAJ,OAAA;AAIA,IAAAK,yBAAA,GAAAL,OAAA"}
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.TokenResponse = exports.CredentialResponse = void 0;
6
+ exports.TokenResponse = exports.ResponseUriResultShape = exports.CredentialResponse = void 0;
7
7
  var _par = require("../../utils/par");
8
8
  var z = _interopRequireWildcard(require("zod"));
9
9
  var _const = require("./const");
@@ -24,5 +24,13 @@ const CredentialResponse = z.object({
24
24
  credential: z.string(),
25
25
  format: _const.SupportedCredentialFormat
26
26
  });
27
+
28
+ /**
29
+ * Shape from parsing a response given by a request uri during the EAA credential issuance flow with response mode "form_post.jwt".
30
+ */
27
31
  exports.CredentialResponse = CredentialResponse;
32
+ const ResponseUriResultShape = z.object({
33
+ redirect_uri: z.string()
34
+ });
35
+ exports.ResponseUriResultShape = ResponseUriResultShape;
28
36
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_par","require","z","_interopRequireWildcard","_const","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","TokenResponse","object","access_token","string","authorization_details","array","AuthorizationDetail","c_nonce","c_nonce_expires_in","number","expires_in","token_type","exports","CredentialResponse","credential","format","SupportedCredentialFormat"],"sourceRoot":"../../../../src","sources":["credential/issuance/types.ts"],"mappings":";;;;;;AAAA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,CAAA,GA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CAAC4B,MAAM,CAAC,CAAC;EACxBC,qBAAqB,EAAE7B,CAAC,CAAC8B,KAAK,CAACC,wBAAmB,CAAC;EACnDC,OAAO,EAAEhC,CAAC,CAAC4B,MAAM,CAAC,CAAC;EACnBK,kBAAkB,EAAEjC,CAAC,CAACkC,MAAM,CAAC,CAAC;EAC9BC,UAAU,EAAEnC,CAAC,CAACkC,MAAM,CAAC,CAAC;EACtBE,UAAU,EAAEpC,CAAC,CAAC4B,MAAM,CAAC;AACvB,CAAC,CAAC;AAACS,OAAA,CAAAZ,aAAA,GAAAA,aAAA;AAII,MAAMa,kBAAkB,GAAGtC,CAAC,CAAC0B,MAAM,CAAC;EACzCM,OAAO,EAAEhC,CAAC,CAAC4B,MAAM,CAAC,CAAC;EACnBK,kBAAkB,EAAEjC,CAAC,CAACkC,MAAM,CAAC,CAAC;EAC9BK,UAAU,EAAEvC,CAAC,CAAC4B,MAAM,CAAC,CAAC;EACtBY,MAAM,EAAEC;AACV,CAAC,CAAC;AAACJ,OAAA,CAAAC,kBAAA,GAAAA,kBAAA"}
1
+ {"version":3,"names":["_par","require","z","_interopRequireWildcard","_const","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","TokenResponse","object","access_token","string","authorization_details","array","AuthorizationDetail","c_nonce","c_nonce_expires_in","number","expires_in","token_type","exports","CredentialResponse","credential","format","SupportedCredentialFormat","ResponseUriResultShape","redirect_uri"],"sourceRoot":"../../../../src","sources":["credential/issuance/types.ts"],"mappings":";;;;;;AAAA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,CAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAAoD,SAAAI,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OA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;EACnBK,kBAAkB,EAAEjC,CAAC,CAACkC,MAAM,CAAC,CAAC;EAC9BC,UAAU,EAAEnC,CAAC,CAACkC,MAAM,CAAC,CAAC;EACtBE,UAAU,EAAEpC,CAAC,CAAC4B,MAAM,CAAC;AACvB,CAAC,CAAC;AAACS,OAAA,CAAAZ,aAAA,GAAAA,aAAA;AAII,MAAMa,kBAAkB,GAAGtC,CAAC,CAAC0B,MAAM,CAAC;EACzCM,OAAO,EAAEhC,CAAC,CAAC4B,MAAM,CAAC,CAAC;EACnBK,kBAAkB,EAAEjC,CAAC,CAACkC,MAAM,CAAC,CAAC;EAC9BK,UAAU,EAAEvC,CAAC,CAAC4B,MAAM,CAAC,CAAC;EACtBY,MAAM,EAAEC;AACV,CAAC,CAAC;;AAEF;AACA;AACA;AAFAJ,OAAA,CAAAC,kBAAA,GAAAA,kBAAA;AAGO,MAAMI,sBAAsB,GAAG1C,CAAC,CAAC0B,MAAM,CAAC;EAC7CiB,YAAY,EAAE3C,CAAC,CAAC4B,MAAM,CAAC;AACzB,CAAC,CAAC;AAACS,OAAA,CAAAK,sBAAA,GAAAA,sBAAA"}
@@ -48,8 +48,9 @@ const CredentialIssuerDisplayMetadata = z.object({
48
48
  logo: z.object({
49
49
  url: z.string(),
50
50
  alt_text: z.string()
51
- })
51
+ }).optional() // TODO [SIW-1268]: should not be optional
52
52
  });
53
+
53
54
  const ClaimsMetadata = z.record(z.object({
54
55
  value_type: z.string(),
55
56
  display: z.array(z.object({
@@ -64,7 +65,8 @@ const SupportedCredentialMetadata = z.object({
64
65
  format: z.union([z.literal("vc+sd-jwt"), z.literal("vc+mdoc-cbor")]),
65
66
  scope: z.string(),
66
67
  display: z.array(CredentialDisplayMetadata),
67
- claims: ClaimsMetadata,
68
+ claims: ClaimsMetadata.optional(),
69
+ // TODO [SIW-1268]: should not be optional
68
70
  cryptographic_binding_methods_supported: z.array(z.string()),
69
71
  credential_signing_alg_values_supported: z.array(z.string())
70
72
  });
@@ -185,7 +187,7 @@ const CredentialIssuerEntityConfiguration = BaseEntityConfiguration.and(z.object
185
187
  /** Credential Issuers act as Relying Party
186
188
  when they require the presentation of other credentials.
187
189
  This does not apply for PID issuance, which requires CIE authz. */
188
- openid_relying_party: RelyingPartyMetadata.optional()
190
+ wallet_relying_party: RelyingPartyMetadata.optional()
189
191
  })
190
192
  })
191
193
  }));
@@ -1 +1 @@
1
- {"version":3,"names":["_types","require","_jwk","z","_interopRequireWildcard","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","TrustMark","object","id","string","trust_mark","exports","RelyingPartyMetadata","application_type","optional","client_id","client_name","jwks","keys","array","JWK","contacts","CredentialDisplayMetadata","name","locale","logo","url","alt_text","background_color","text_color","CredentialIssuerDisplayMetadata","ClaimsMetadata","record","value_type","display","SupportedCredentialMetadata","format","union","literal","scope","claims","cryptographic_binding_methods_supported","credential_signing_alg_values_supported","EntityStatement","header","typ","alg","kid","payload","iss","sub","trust_marks","iat","number","exp","EntityConfigurationHeader","FederationEntityMetadata","federation_fetch_endpoint","federation_list_endpoint","federation_resolve_endpoint","federation_trust_mark_status_endpoint","federation_trust_mark_list_endpoint","organization_name","homepage_uri","policy_uri","logo_uri","passthrough","BaseEntityConfiguration","UnixTime","authority_hints","metadata","federation_entity","TrustAnchorEntityConfiguration","CredentialIssuerEntityConfiguration","and","openid_credential_issuer","credential_issuer","credential_endpoint","revocation_endpoint","status_attestation_endpoint","credential_configurations_supported","oauth_authorization_server","authorization_endpoint","pushed_authorization_request_endpoint","dpop_signing_alg_values_supported","token_endpoint","introspection_endpoint","client_registration_types_supported","code_challenge_methods_supported","authorization_details_types_supported","acr_values_supported","grant_types_supported","issuer","scopes_supported","request_parameter_supported","boolean","request_uri_parameter_supported","response_types_supported","response_modes_supported","subject_types_supported","token_endpoint_auth_methods_supported","token_endpoint_auth_signing_alg_values_supported","request_object_signing_alg_values_supported","openid_relying_party","RelyingPartyEntityConfiguration","wallet_relying_party","WalletProviderEntityConfiguration","wallet_provider","aal_values_supported","EntityConfiguration","description"],"sourceRoot":"../../../src","sources":["trust/types.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,IAAA,GAAAD,OAAA;AACA,IAAAE,CAAA,GAAAC,uBAAA,CAAAH,OAAA;AAAyB,SAAAI,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAF,wBAAAM,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,oBAAAA,GAAA,wBAAAA,GAAA,4BAAAE,OAAA,EAAAF,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAAA,CAAAC,cAAA,CAAAH,MAAA,EAAAK,GAAA,EAAAI,IAAA,YAAAT,MAAA,CAAAK,GAAA,IA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gC,+BAA+B,CAChC,EACD;EACEM,WAAW,EAAE;AACf,CACF,CAAC;AAACnG,OAAA,CAAAkG,mBAAA,GAAAA,mBAAA"}
1
+ {"version":3,"names":["_types","require","_jwk","z","_interopRequireWildcard","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","TrustMark","object","id","string","trust_mark","exports","RelyingPartyMetadata","application_type","optional","client_id","client_name","jwks","keys","array","JWK","contacts","CredentialDisplayMetadata","name","locale","logo","url","alt_text","background_color","text_color","CredentialIssuerDisplayMetadata","ClaimsMetadata","record","value_type","display","SupportedCredentialMetadata","format","union","literal","scope","claims","cryptographic_binding_methods_supported","credential_signing_alg_values_supported","EntityStatement","header","typ","alg","kid","payload","iss","sub","trust_marks","iat","number","exp","EntityConfigurationHeader","FederationEntityMetadata","federation_fetch_endpoint","federation_list_endpoint","federation_resolve_endpoint","federation_trust_mark_status_endpoint","federation_trust_mark_list_endpoint","organization_name","homepage_uri","policy_uri","logo_uri","passthrough","BaseEntityConfiguration","UnixTime","authority_hints","metadata","federation_entity","TrustAnchorEntityConfiguration","CredentialIssuerEntityConfiguration","and","openid_credential_issuer","credential_issuer","credential_endpoint","revocation_endpoint","status_attestation_endpoint","credential_configurations_supported","oauth_authorization_server","authorization_endpoint","pushed_authorization_request_endpoint","dpop_signing_alg_values_supported","token_endpoint","introspection_endpoint","client_registration_types_supported","code_challenge_methods_supported","authorization_details_types_supported","acr_values_supported","grant_types_supported","issuer","scopes_supported","request_parameter_supported","boolean","request_uri_parameter_supported","response_types_supported","response_modes_supported","subject_types_supported","token_endpoint_auth_methods_supported","token_endpoint_auth_signing_alg_values_supported","request_object_signing_alg_values_supported","wallet_relying_party","RelyingPartyEntityConfiguration","WalletProviderEntityConfiguration","wallet_provider","aal_values_supported","EntityConfiguration","description"],"sourceRoot":"../../../src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AAiG,mBAAA,GAAAA,mBAAA"}
@@ -10,30 +10,39 @@ var _errors = require("./errors");
10
10
  * Decode a form_post.jwt and return the final JWT.
11
11
  * The formData here is in form_post.jwt format as defined in
12
12
  * JWT Secured Authorization Response Mode for OAuth 2.0 (JARM)
13
- * HTTP/1.1 200 OK
14
- * Content-Type: text/html;charset=UTF-8
15
- * Cache-Control: no-cache, no-store
16
- * Pragma: no-cache
17
- *
18
- * <html>
19
- * <head><title>Submit This Form</title></head>
20
- * <body onload="javascript:document.forms[0].submit()">
21
- * <form method="post" action="https://client.example.com/cb">
22
- * <input type="hidden" name="response"
23
- * value="eyJhbGciOiJSUz....."/>
24
- * </form>
25
- * </body>
26
- * </html>
13
+ <!DOCTYPE html>
14
+ <html>
15
+ <head>
16
+ <meta charset="utf-8" />
17
+ </head>
18
+ <body onload="document.forms[0].submit()">
19
+ <noscript>
20
+ <p>
21
+ <strong>Note:</strong> Since your browser does not support JavaScript, you must press the Continue button once to proceed.
22
+ </p>
23
+ </noscript>
24
+ <form action="iowalletexample//cb" method="post">
25
+ <div>
26
+ <input type="hidden" name="response" value="somevalue" />
27
+ </div>
28
+ <noscript>
29
+ <div>
30
+ <input type="submit" value="Continue" />
31
+ </div>
32
+ </noscript>
33
+ </form>
34
+ </body>
35
+ </html>
27
36
  */
28
37
  const getJwtFromFormPost = async formData => {
29
- const formPostRegex = /<input(.|\n)*value\s*=\s*"((.|\n)*)"(.|\n)*>/gm;
38
+ const formPostRegex = /<input[^>]*name="response"[^>]*value="([^"]*)"/i;
30
39
  const lineExpressionRegex = /\r\n|\n\r|\n|\r|\s+/g;
31
- const matches = formPostRegex.exec(formData);
32
- if (matches && matches.length >= 2) {
33
- const responseJwt = matches[2];
40
+ const match = formPostRegex.exec(formData);
41
+ if (match && match[1]) {
42
+ const responseJwt = match[1];
34
43
  if (responseJwt) {
35
44
  const jwt = responseJwt.replace(lineExpressionRegex, "");
36
- const decodedJwt = await (0, _ioReactNativeJwt.decode)(jwt);
45
+ const decodedJwt = (0, _ioReactNativeJwt.decode)(jwt);
37
46
  return {
38
47
  jwt,
39
48
  decodedJwt
@@ -1 +1 @@
1
- {"version":3,"names":["_ioReactNativeJwt","require","_errors","getJwtFromFormPost","formData","formPostRegex","lineExpressionRegex","matches","exec","length","responseJwt","jwt","replace","decodedJwt","decodeJwt","ValidationFailed","exports"],"sourceRoot":"../../../src","sources":["utils/decoder.ts"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AAEA,IAAAC,OAAA,GAAAD,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAME,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,MAAM,IAAAC,wBAAS,EAACH,GAAG,CAAC;MACvC,OAAO;QAAEA,GAAG;QAAEE;MAAW,CAAC;IAC5B;EACF;EAEA,MAAM,IAAIE,wBAAgB,CACvB,uDAAsDX,QAAS,EAClE,CAAC;AACH,CAAC;AAACY,OAAA,CAAAb,kBAAA,GAAAA,kBAAA"}
1
+ {"version":3,"names":["_ioReactNativeJwt","require","_errors","getJwtFromFormPost","formData","formPostRegex","lineExpressionRegex","match","exec","responseJwt","jwt","replace","decodedJwt","decodeJwt","ValidationFailed","exports"],"sourceRoot":"../../../src","sources":["utils/decoder.ts"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AAEA,IAAAC,OAAA,GAAAD,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,MAAME,kBAAkB,GAAG,MAChCC,QAAgB,IAC0C;EAC1D,MAAMC,aAAa,GAAG,iDAAiD;EACvE,MAAMC,mBAAmB,GAAG,sBAAsB;EAElD,MAAMC,KAAK,GAAGF,aAAa,CAACG,IAAI,CAACJ,QAAQ,CAAC;EAC1C,IAAIG,KAAK,IAAIA,KAAK,CAAC,CAAC,CAAC,EAAE;IACrB,MAAME,WAAW,GAAGF,KAAK,CAAC,CAAC,CAAC;IAE5B,IAAIE,WAAW,EAAE;MACf,MAAMC,GAAG,GAAGD,WAAW,CAACE,OAAO,CAACL,mBAAmB,EAAE,EAAE,CAAC;MACxD,MAAMM,UAAU,GAAG,IAAAC,wBAAS,EAACH,GAAG,CAAC;MACjC,OAAO;QAAEA,GAAG;QAAEE;MAAW,CAAC;IAC5B;EACF;EAEA,MAAM,IAAIE,wBAAgB,CACvB,uDAAsDV,QAAS,EAClE,CAAC;AACH,CAAC;AAACW,OAAA,CAAAZ,kBAAA,GAAAA,kBAAA"}