@pagopa/io-react-native-wallet 0.26.0 → 0.27.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (73) hide show
  1. package/README.md +1 -3
  2. package/lib/commonjs/credential/issuance/05-authorize-access.js +1 -0
  3. package/lib/commonjs/credential/issuance/05-authorize-access.js.map +1 -1
  4. package/lib/commonjs/credential/issuance/06-obtain-credential.js +1 -2
  5. package/lib/commonjs/credential/issuance/06-obtain-credential.js.map +1 -1
  6. package/lib/commonjs/credential/issuance/errors.js +1 -18
  7. package/lib/commonjs/credential/issuance/errors.js.map +1 -1
  8. package/lib/commonjs/credential/status/02-status-attestation.js +2 -4
  9. package/lib/commonjs/credential/status/02-status-attestation.js.map +1 -1
  10. package/lib/commonjs/index.js +1 -3
  11. package/lib/commonjs/index.js.map +1 -1
  12. package/lib/commonjs/wallet-instance-attestation/issuing.js +1 -2
  13. package/lib/commonjs/wallet-instance-attestation/issuing.js.map +1 -1
  14. package/lib/module/credential/issuance/05-authorize-access.js +1 -0
  15. package/lib/module/credential/issuance/05-authorize-access.js.map +1 -1
  16. package/lib/module/credential/issuance/06-obtain-credential.js +1 -2
  17. package/lib/module/credential/issuance/06-obtain-credential.js.map +1 -1
  18. package/lib/module/credential/issuance/errors.js +0 -16
  19. package/lib/module/credential/issuance/errors.js.map +1 -1
  20. package/lib/module/credential/status/02-status-attestation.js +2 -4
  21. package/lib/module/credential/status/02-status-attestation.js.map +1 -1
  22. package/lib/module/index.js +1 -2
  23. package/lib/module/index.js.map +1 -1
  24. package/lib/module/wallet-instance-attestation/issuing.js +1 -2
  25. package/lib/module/wallet-instance-attestation/issuing.js.map +1 -1
  26. package/lib/typescript/credential/issuance/05-authorize-access.d.ts +1 -0
  27. package/lib/typescript/credential/issuance/05-authorize-access.d.ts.map +1 -1
  28. package/lib/typescript/credential/issuance/errors.d.ts +0 -9
  29. package/lib/typescript/credential/issuance/errors.d.ts.map +1 -1
  30. package/lib/typescript/credential/status/02-status-attestation.d.ts +1 -2
  31. package/lib/typescript/credential/status/02-status-attestation.d.ts.map +1 -1
  32. package/lib/typescript/index.d.ts +1 -2
  33. package/lib/typescript/index.d.ts.map +1 -1
  34. package/lib/typescript/wallet-instance-attestation/issuing.d.ts +2 -2
  35. package/lib/typescript/wallet-instance-attestation/issuing.d.ts.map +1 -1
  36. package/package.json +2 -6
  37. package/src/credential/issuance/05-authorize-access.ts +1 -0
  38. package/src/credential/issuance/06-obtain-credential.ts +1 -2
  39. package/src/credential/issuance/errors.ts +0 -15
  40. package/src/credential/status/02-status-attestation.ts +2 -4
  41. package/src/index.ts +0 -2
  42. package/src/wallet-instance-attestation/issuing.ts +1 -2
  43. package/lib/commonjs/cie/README.md +0 -6
  44. package/lib/commonjs/cie/component.js +0 -182
  45. package/lib/commonjs/cie/component.js.map +0 -1
  46. package/lib/commonjs/cie/error.js +0 -44
  47. package/lib/commonjs/cie/error.js.map +0 -1
  48. package/lib/commonjs/cie/index.js +0 -32
  49. package/lib/commonjs/cie/index.js.map +0 -1
  50. package/lib/commonjs/cie/manager.js +0 -142
  51. package/lib/commonjs/cie/manager.js.map +0 -1
  52. package/lib/module/cie/README.md +0 -6
  53. package/lib/module/cie/component.js +0 -172
  54. package/lib/module/cie/component.js.map +0 -1
  55. package/lib/module/cie/error.js +0 -36
  56. package/lib/module/cie/error.js.map +0 -1
  57. package/lib/module/cie/index.js +0 -4
  58. package/lib/module/cie/index.js.map +0 -1
  59. package/lib/module/cie/manager.js +0 -133
  60. package/lib/module/cie/manager.js.map +0 -1
  61. package/lib/typescript/cie/component.d.ts +0 -46
  62. package/lib/typescript/cie/component.d.ts.map +0 -1
  63. package/lib/typescript/cie/error.d.ts +0 -31
  64. package/lib/typescript/cie/error.d.ts.map +0 -1
  65. package/lib/typescript/cie/index.d.ts +0 -4
  66. package/lib/typescript/cie/index.d.ts.map +0 -1
  67. package/lib/typescript/cie/manager.d.ts +0 -5
  68. package/lib/typescript/cie/manager.d.ts.map +0 -1
  69. package/src/cie/README.md +0 -6
  70. package/src/cie/component.tsx +0 -218
  71. package/src/cie/error.ts +0 -58
  72. package/src/cie/index.ts +0 -4
  73. package/src/cie/manager.ts +0 -183
@@ -1,172 +0,0 @@
1
- import React, { createRef } from "react";
2
- import { Platform } from "react-native";
3
- import { WebView } from "react-native-webview";
4
- import { startCieAndroid, startCieiOS } from "./manager";
5
- import { CieError, CieErrorType } from "./error";
6
- const AUTH_LINK_PATTERN = "lettura carta";
7
-
8
- /* To obtain the authentication URL on CIE L3 it is necessary to take the
9
- * link contained in the "Entra con lettura carta CIE" button.
10
- * This link can then be used on CieManager.
11
- * This javascript code takes the link in question and sends it to the react native function via postMessage
12
- */
13
- const injectedJavaScript = `
14
- (function() {
15
- function sendDocumentContent() {
16
- const idpAuthUrl = [...document.querySelectorAll("a")]
17
- .filter(a => a.textContent.toLowerCase().includes("${AUTH_LINK_PATTERN}"))
18
- .map(a=>a.href)[0];
19
-
20
- if(idpAuthUrl) {
21
- window.ReactNativeWebView.postMessage(idpAuthUrl);
22
- }
23
- }
24
- if (document.readyState === 'complete') {
25
- sendDocumentContent();
26
- } else {
27
- window.addEventListener('load', sendDocumentContent);
28
- }
29
- })();
30
- true;
31
- `;
32
- export let CieEvent = /*#__PURE__*/function (CieEvent) {
33
- CieEvent["reading"] = "reading";
34
- CieEvent["completed"] = "completed";
35
- CieEvent["waiting_card"] = "waiting_card";
36
- return CieEvent;
37
- }({});
38
- /*
39
- * To make sure the server recognizes the client as valid iPhone device (iOS only) we use a custom header
40
- * on Android it is not required.
41
- */
42
- const iOSUserAgent = "Mozilla/5.0 (iPhone; CPU iPhone OS 14_0_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Mobile/15E148 Safari/604.1";
43
- const defaultUserAgent = Platform.select({
44
- ios: iOSUserAgent,
45
- default: undefined
46
- });
47
- const webView = /*#__PURE__*/createRef();
48
-
49
- /**
50
- * WebViewComponent
51
- *
52
- * Component that manages authentication via CIE L3 (NFC+PIN) based on WebView (react-native-webview).
53
- * In particular, once rendered, it makes a series of calls to the authUrl in the WebView,
54
- * extrapolates the authentication URL necessary for CieManager to sign via certificate
55
- * and calls the CIE SDK which is responsible for starting card reading via NFC.
56
- * At the end of the reading, a redirect is made in the WebView towards the page that asks
57
- * the user for consent to send the data to the Service Provider. This moment can be captured
58
- * via the onUserInteraction parameter. When the user allows or denies their consent,
59
- * a redirect is made to the URL set by the Service Provider.
60
- * This url can be configured using the redirectUrl parameter which allows you to close the WebView.
61
- * The event can then be captured via the onSuccess parameter.
62
- *
63
- * @param {CIEParams} params - Parameters required by the component.
64
- * @param {string} params.authUrl -The authentication URL of the Service Provider to which to authenticate.
65
- * @param {boolean} params.useUat - If set to true it uses the CIE testing environment.
66
- * @param {string} params.pin - CIE pin for use with NFC reading.
67
- * @param {Function} params.onError - Callback function in case of error. The function is passed the Error parameter.
68
- * @param {Function} params.onSuccess - Callback at the end of authentication to which the redirect URL including parameters is passed.
69
- * @param {string} params.redirectUrl - Redirect URL set by the Service Provider. It is used to stop the flow and return to the calling function via onSuccess.
70
- * @param {Function} params.onEvent - Callback function that is called whenever there is a new CieEvent from the CIE reader.
71
- * @returns {JSX.Element} - The configured component with WebView.
72
- */
73
- export const WebViewComponent = params => {
74
- const [webViewUrl, setWebViewUrl] = React.useState(params.authUrl);
75
- const [isCardReadingFinished, setCardReadingFinished] = React.useState(false);
76
-
77
- /*
78
- * Once the reading of the card with NFC is finished, it is necessary
79
- * to change the URL of the WebView by redirecting to the URL returned by
80
- * CieManager to allow the user to continue with the consent authorization
81
- * */
82
- const continueWithUrl = callbackUrl => {
83
- setCardReadingFinished(true);
84
- setWebViewUrl(callbackUrl);
85
- };
86
-
87
- // This function is called from the injected javascript code (postMessage). Which receives the authentication URL
88
- const handleMessage = async event => {
89
- const cieAuthorizationUri = event.nativeEvent.data;
90
- const startCie = Platform.select({
91
- ios: startCieiOS,
92
- default: startCieAndroid
93
- });
94
- await startCie(params.useUat, params.pin, params.onError, params.onEvent, cieAuthorizationUri, continueWithUrl);
95
- };
96
-
97
- //This function is called when authentication with CIE ends and the SP URL containing code and state is returned
98
- const handleShouldStartLoading = (onSuccess, redirectUrl) => event => {
99
- if (isCardReadingFinished && event.url.includes(redirectUrl)) {
100
- onSuccess(event.url);
101
- return false;
102
- } else {
103
- return true;
104
- }
105
- };
106
- const handleOnLoadEnd = (onError, onCieEvent) => e => {
107
- const eventTitle = e.nativeEvent.title.toLowerCase();
108
- if (eventTitle === "pagina web non disponibile" ||
109
- // On Android, if we attempt to access the idp URL twice,
110
- // we are presented with an error page titled "ERROR".
111
- eventTitle === "errore") {
112
- handleOnError(onError)(new Error(eventTitle));
113
- }
114
-
115
- /* At the end of loading the page, if the card has already been read
116
- * then the WebView has loaded the page to ask the user for consent,
117
- * so send the completed event
118
- * */
119
- if (isCardReadingFinished) {
120
- onCieEvent(CieEvent.completed);
121
- }
122
- };
123
- const handleOnError = onError => e => {
124
- const error = e;
125
- const webViewError = e;
126
- const webViewHttpError = e;
127
- if (webViewHttpError.nativeEvent.statusCode) {
128
- const {
129
- description,
130
- statusCode
131
- } = webViewHttpError.nativeEvent;
132
- onError(new CieError({
133
- message: `WebView http error: ${description} with status code: ${statusCode}`,
134
- type: CieErrorType.WEB_VIEW_ERROR
135
- }));
136
- } else if (webViewError.nativeEvent) {
137
- const {
138
- code,
139
- description
140
- } = webViewError.nativeEvent;
141
- onError(new CieError({
142
- message: `WebView error: ${description} with code: ${code}`,
143
- type: CieErrorType.WEB_VIEW_ERROR
144
- }));
145
- } else if (error.message !== undefined) {
146
- onError(new CieError({
147
- message: `${error.message}`,
148
- type: CieErrorType.WEB_VIEW_ERROR
149
- }));
150
- } else {
151
- onError(new CieError({
152
- message: "An error occurred in the WebView",
153
- type: CieErrorType.WEB_VIEW_ERROR
154
- }));
155
- }
156
- };
157
- return /*#__PURE__*/React.createElement(WebView, {
158
- ref: webView,
159
- userAgent: defaultUserAgent,
160
- javaScriptEnabled: true,
161
- source: {
162
- uri: webViewUrl
163
- },
164
- onLoadEnd: handleOnLoadEnd(params.onError, params.onEvent),
165
- onError: handleOnError(params.onError),
166
- onHttpError: handleOnError(params.onError),
167
- injectedJavaScript: injectedJavaScript,
168
- onShouldStartLoadWithRequest: handleShouldStartLoading(params.onSuccess, params.redirectUrl),
169
- onMessage: handleMessage
170
- });
171
- };
172
- //# sourceMappingURL=component.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","createRef","Platform","WebView","startCieAndroid","startCieiOS","CieError","CieErrorType","AUTH_LINK_PATTERN","injectedJavaScript","CieEvent","iOSUserAgent","defaultUserAgent","select","ios","default","undefined","webView","WebViewComponent","params","webViewUrl","setWebViewUrl","useState","authUrl","isCardReadingFinished","setCardReadingFinished","continueWithUrl","callbackUrl","handleMessage","event","cieAuthorizationUri","nativeEvent","data","startCie","useUat","pin","onError","onEvent","handleShouldStartLoading","onSuccess","redirectUrl","url","includes","handleOnLoadEnd","onCieEvent","e","eventTitle","title","toLowerCase","handleOnError","Error","completed","error","webViewError","webViewHttpError","statusCode","description","message","type","WEB_VIEW_ERROR","code","createElement","ref","userAgent","javaScriptEnabled","source","uri","onLoadEnd","onHttpError","onShouldStartLoadWithRequest","onMessage"],"sourceRoot":"../../../src","sources":["cie/component.tsx"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,QAAQ,QAAQ,cAAc;AACvC,SAASC,OAAO,QAAQ,sBAAsB;AAS9C,SAASC,eAAe,EAAEC,WAAW,QAA8B,WAAW;AAC9E,SAASC,QAAQ,EAAEC,YAAY,QAAQ,SAAS;AAEhD,MAAMC,iBAAiB,GAAG,eAAe;;AAEzC;AACA;AACA;AACA;AACA;AACA,MAAMC,kBAAkB,GAAI;AAC5B;AACA;AACA;AACA,6DAA6DD,iBAAkB;AAC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AAIH,WAAYE,QAAQ,0BAARA,QAAQ;EAARA,QAAQ;EAARA,QAAQ;EAAR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AAQ,CAAC;QACXmD,OAAO,EAAG,kBAAiBD,WAAY,eAAcI,IAAK,EAAC;QAC3DF,IAAI,EAAEnD,YAAY,CAACoD;MACrB,CAAC,CACH,CAAC;IACH,CAAC,MAAM,IAAIP,KAAK,CAACK,OAAO,KAAKzC,SAAS,EAAE;MACtCoB,OAAO,CACL,IAAI9B,QAAQ,CAAC;QACXmD,OAAO,EAAG,GAAEL,KAAK,CAACK,OAAQ,EAAC;QAC3BC,IAAI,EAAEnD,YAAY,CAACoD;MACrB,CAAC,CACH,CAAC;IACH,CAAC,MAAM;MACLvB,OAAO,CACL,IAAI9B,QAAQ,CAAC;QACXmD,OAAO,EAAE,kCAAkC;QAC3CC,IAAI,EAAEnD,YAAY,CAACoD;MACrB,CAAC,CACH,CAAC;IACH;EACF,CAAC;EAEH,oBACE3D,KAAA,CAAA6D,aAAA,CAAC1D,OAAO;IACN2D,GAAG,EAAE7C,OAAQ;IACb8C,SAAS,EAAEnD,gBAAiB;IAC5BoD,iBAAiB,EAAE,IAAK;IACxBC,MAAM,EAAE;MAAEC,GAAG,EAAE9C;IAAW,CAAE;IAC5B+C,SAAS,EAAExB,eAAe,CAACxB,MAAM,CAACiB,OAAO,EAAEjB,MAAM,CAACkB,OAAO,CAAE;IAC3DD,OAAO,EAAEa,aAAa,CAAC9B,MAAM,CAACiB,OAAO,CAAE;IACvCgC,WAAW,EAAEnB,aAAa,CAAC9B,MAAM,CAACiB,OAAO,CAAE;IAC3C3B,kBAAkB,EAAEA,kBAAmB;IACvC4D,4BAA4B,EAAE/B,wBAAwB,CACpDnB,MAAM,CAACoB,SAAS,EAChBpB,MAAM,CAACqB,WACT,CAAE;IACF8B,SAAS,EAAE1C;EAAc,CAC1B,CAAC;AAEN,CAAC"}
@@ -1,36 +0,0 @@
1
- export let CieErrorType = /*#__PURE__*/function (CieErrorType) {
2
- CieErrorType[CieErrorType["GENERIC"] = 0] = "GENERIC";
3
- CieErrorType[CieErrorType["TAG_NOT_VALID"] = 1] = "TAG_NOT_VALID";
4
- CieErrorType[CieErrorType["WEB_VIEW_ERROR"] = 2] = "WEB_VIEW_ERROR";
5
- CieErrorType[CieErrorType["NFC_ERROR"] = 3] = "NFC_ERROR";
6
- CieErrorType[CieErrorType["AUTHENTICATION_ERROR"] = 4] = "AUTHENTICATION_ERROR";
7
- CieErrorType[CieErrorType["PIN_ERROR"] = 5] = "PIN_ERROR";
8
- CieErrorType[CieErrorType["PIN_LOCKED"] = 6] = "PIN_LOCKED";
9
- CieErrorType[CieErrorType["CERTIFICATE_ERROR"] = 7] = "CERTIFICATE_ERROR";
10
- return CieErrorType;
11
- }({});
12
- export class CieError extends Error {
13
- constructor(options) {
14
- super(options.message);
15
- if (options.type) {
16
- this.type = options.type;
17
- } else {
18
- this.type = CieErrorType.GENERIC;
19
- }
20
- if (this.type === CieErrorType.PIN_ERROR) {
21
- this.attemptsLeft = options.attemptsLeft;
22
- } else if (this.type === CieErrorType.PIN_LOCKED) {
23
- this.attemptsLeft = 0;
24
- }
25
- this.name = this.constructor.name;
26
- }
27
- toString() {
28
- return JSON.stringify({
29
- name: this.name,
30
- type: CieErrorType[this.type],
31
- message: this.message,
32
- attemptsLeft: this.attemptsLeft
33
- });
34
- }
35
- }
36
- //# sourceMappingURL=error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["CieErrorType","CieError","Error","constructor","options","message","type","GENERIC","PIN_ERROR","attemptsLeft","PIN_LOCKED","name","toString","JSON","stringify"],"sourceRoot":"../../../src","sources":["cie/error.ts"],"mappings":"AAAA,WAAYA,YAAY,0BAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAZA,YAAY,CAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;AA4BxB,OAAO,MAAMC,QAAQ,SAASC,KAAK,CAAC;EAGlCC,WAAWA,CAACC,OAAqB,EAAE;IACjC,KAAK,CAACA,OAAO,CAACC,OAAO,CAAC;IAEtB,IAAID,OAAO,CAACE,IAAI,EAAE;MAChB,IAAI,CAACA,IAAI,GAAGF,OAAO,CAACE,IAAI;IAC1B,CAAC,MAAM;MACL,IAAI,CAACA,IAAI,GAAGN,YAAY,CAACO,OAAO;IAClC;IAEA,IAAI,IAAI,CAACD,IAAI,KAAKN,YAAY,CAACQ,SAAS,EAAE;MACxC,IAAI,CAACC,YAAY,GAAGL,OAAO,CAACK,YAAY;IAC1C,CAAC,MAAM,IAAI,IAAI,CAACH,IAAI,KAAKN,YAAY,CAACU,UAAU,EAAE;MAChD,IAAI,CAACD,YAAY,GAAG,CAAC;IACvB;IAEA,IAAI,CAACE,IAAI,GAAG,IAAI,CAACR,WAAW,CAACQ,IAAI;EACnC;EAEAC,QAAQA,CAAA,EAAW;IACjB,OAAOC,IAAI,CAACC,SAAS,CAAC;MACpBH,IAAI,EAAE,IAAI,CAACA,IAAI;MACfL,IAAI,EAAEN,YAAY,CAAC,IAAI,CAACM,IAAI,CAAC;MAC7BD,OAAO,EAAE,IAAI,CAACA,OAAO;MACrBI,YAAY,EAAE,IAAI,CAACA;IACrB,CAAC,CAAC;EACJ;AACF"}
@@ -1,4 +0,0 @@
1
- import { CieEvent, WebViewComponent } from "./component";
2
- import { CieError, CieErrorType } from "./error";
3
- export { WebViewComponent, CieError, CieErrorType, CieEvent };
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["CieEvent","WebViewComponent","CieError","CieErrorType"],"sourceRoot":"../../../src","sources":["cie/index.ts"],"mappings":"AAAA,SAASA,QAAQ,EAAEC,gBAAgB,QAAQ,aAAa;AACxD,SAASC,QAAQ,EAAEC,YAAY,QAAQ,SAAS;AAEhD,SAASF,gBAAgB,EAAEC,QAAQ,EAAEC,YAAY,EAAEH,QAAQ"}
@@ -1,133 +0,0 @@
1
- import cieManager from "@pagopa/react-native-cie";
2
- import { Platform } from "react-native";
3
- import { CieEvent } from "./component";
4
- import { CieError, CieErrorType } from "./error";
5
- const BASE_UAT_URL = "https://collaudo.idserver.servizicie.interno.gov.it/idp/";
6
- export const startCieAndroid = (useCieUat, ciePin, onError, onEvent, cieAuthorizationUri, continueWithUrl) => {
7
- try {
8
- cieManager.removeAllListeners();
9
- cieManager.start().then(async () => {
10
- cieManager.onEvent(handleCieEvent(onError, onEvent));
11
- cieManager.onError(e => {
12
- console.error(e);
13
- return onError(new CieError({
14
- message: e.message
15
- }));
16
- });
17
- cieManager.onSuccess(handleCieSuccess(continueWithUrl));
18
- await cieManager.setPin(ciePin);
19
- cieManager.setAuthenticationUrl(cieAuthorizationUri);
20
- cieManager.enableLog(useCieUat);
21
- cieManager.setCustomIdpUrl(useCieUat ? getCieUatEndpoint() : null);
22
- await cieManager.startListeningNFC();
23
- onEvent(CieEvent.waiting_card);
24
- }).catch(onError);
25
- } catch (e) {
26
- onError(new CieError({
27
- message: `Unable to start CIE NFC manager on Android: ${e}`,
28
- type: CieErrorType.NFC_ERROR
29
- }));
30
- }
31
- };
32
- export const startCieiOS = async (useCieUat, ciePin, onError, onEvent, cieAuthorizationUri, continueWithUrl) => {
33
- try {
34
- cieManager.removeAllListeners();
35
- cieManager.onEvent(handleCieEvent(onError, onEvent));
36
- cieManager.onError(e => onError(new CieError({
37
- message: e.message
38
- })));
39
- cieManager.onSuccess(handleCieSuccess(continueWithUrl));
40
- cieManager.enableLog(useCieUat);
41
- cieManager.setCustomIdpUrl(useCieUat ? getCieUatEndpoint() : null);
42
- await cieManager.setPin(ciePin);
43
- cieManager.setAuthenticationUrl(cieAuthorizationUri);
44
- cieManager.start().then(async () => {
45
- await cieManager.startListeningNFC();
46
- onEvent(CieEvent.waiting_card);
47
- }).catch(onError);
48
- } catch (e) {
49
- onError(new CieError({
50
- message: `Unable to start CIE NFC manager on iOS: ${e}`,
51
- type: CieErrorType.NFC_ERROR
52
- }));
53
- }
54
- };
55
- const handleCieEvent = (onError, onEvent) => event => {
56
- switch (event.event) {
57
- // Reading starts
58
- case "ON_TAG_DISCOVERED":
59
- onEvent(CieEvent.reading);
60
- break;
61
- // "Function not supported" seems to be TAG_ERROR_NFC_NOT_SUPPORTED
62
- // for the iOS SDK
63
- case "Function not supported":
64
- case "TAG_ERROR_NFC_NOT_SUPPORTED":
65
- case "ON_TAG_DISCOVERED_NOT_CIE":
66
- onError(new CieError({
67
- message: `Invalid CIE card: ${event.event}`,
68
- type: CieErrorType.TAG_NOT_VALID
69
- }));
70
- break;
71
- case "AUTHENTICATION_ERROR":
72
- case "ON_NO_INTERNET_CONNECTION":
73
- onError(new CieError({
74
- message: `Authentication error or no internet connection`,
75
- type: CieErrorType.AUTHENTICATION_ERROR
76
- }));
77
- break;
78
- case "EXTENDED_APDU_NOT_SUPPORTED":
79
- onError(new CieError({
80
- message: `APDU not supported`,
81
- type: CieErrorType.NFC_ERROR
82
- }));
83
- break;
84
- case "Transmission Error":
85
- case "ON_TAG_LOST":
86
- onError(new CieError({
87
- message: `Trasmission error`,
88
- type: CieErrorType.NFC_ERROR
89
- }));
90
- break;
91
-
92
- // The card is temporarily locked. Unlock is available by CieID app
93
- case "PIN Locked":
94
- case "ON_CARD_PIN_LOCKED":
95
- onError(new CieError({
96
- message: `PIN locked`,
97
- type: CieErrorType.PIN_LOCKED
98
- }));
99
- break;
100
- case "ON_PIN_ERROR":
101
- onError(new CieError({
102
- message: `PIN locked`,
103
- type: CieErrorType.PIN_ERROR,
104
- attemptsLeft: event.attemptsLeft
105
- }));
106
- break;
107
-
108
- // CIE is Expired or Revoked
109
- case "CERTIFICATE_EXPIRED":
110
- onError(new CieError({
111
- message: `Certificate expired`,
112
- type: CieErrorType.CERTIFICATE_ERROR
113
- }));
114
- break;
115
- case "CERTIFICATE_REVOKED":
116
- onError(new CieError({
117
- message: `Certificate revoked`,
118
- type: CieErrorType.CERTIFICATE_ERROR
119
- }));
120
- break;
121
- default:
122
- break;
123
- }
124
- };
125
- const handleCieSuccess = continueWithUrl => url => {
126
- continueWithUrl(decodeURIComponent(url));
127
- };
128
- const getCieUatEndpoint = () => Platform.select({
129
- ios: `${BASE_UAT_URL}Authn/SSL/Login2`,
130
- android: BASE_UAT_URL,
131
- default: null
132
- });
133
- //# sourceMappingURL=manager.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["cieManager","Platform","CieEvent","CieError","CieErrorType","BASE_UAT_URL","startCieAndroid","useCieUat","ciePin","onError","onEvent","cieAuthorizationUri","continueWithUrl","removeAllListeners","start","then","handleCieEvent","e","console","error","message","onSuccess","handleCieSuccess","setPin","setAuthenticationUrl","enableLog","setCustomIdpUrl","getCieUatEndpoint","startListeningNFC","waiting_card","catch","type","NFC_ERROR","startCieiOS","event","reading","TAG_NOT_VALID","AUTHENTICATION_ERROR","PIN_LOCKED","PIN_ERROR","attemptsLeft","CERTIFICATE_ERROR","url","decodeURIComponent","select","ios","android","default"],"sourceRoot":"../../../src","sources":["cie/manager.ts"],"mappings":"AAAA,OAAOA,UAAU,MAAgC,0BAA0B;AAC3E,SAASC,QAAQ,QAAQ,cAAc;AACvC,SAASC,QAAQ,QAAuC,aAAa;AACrE,SAASC,QAAQ,EAAEC,YAAY,QAAQ,SAAS;AAEhD,MAAMC,YAAY,GAAG,0DAA0D;AAI/E,OAAO,MAAMC,eAAe,GAAGA,CAC7BC,SAAkB,EAClBC,MAAc,EACdC,OAAgB,EAChBC,OAAmB,EACnBC,mBAA2B,EAC3BC,eAAgC,KAC7B;EACH,IAAI;IACFZ,UAAU,CAACa,kBAAkB,CAAC,CAAC;IAC/Bb,UAAU,CACPc,KAAK,CAAC,CAAC,CACPC,IAAI,CAAC,YAAY;MAChBf,UAAU,CAACU,OAAO,CAACM,cAAc,CAACP,OAAO,EAAEC,OAAO,CAAC,CAAC;MACpDV,UAAU,CAACS,OAAO,CAAEQ,CAAQ,IAAK;QAC/BC,OAAO,CAACC,KAAK,CAACF,C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,GAAExC,YAAa,kBAAiB;EACtCyC,OAAO,EAAEzC,YAAY;EACrB0C,OAAO,EAAE;AACX,CAAC,CAAC"}
@@ -1,46 +0,0 @@
1
- import React from "react";
2
- import { CieError } from "./error";
3
- export type OnSuccess = (url: string) => void;
4
- export type OnError = (e: CieError) => void;
5
- export type OnCieEvent = (e: CieEvent) => void;
6
- export declare enum CieEvent {
7
- "reading" = "reading",
8
- "completed" = "completed",
9
- "waiting_card" = "waiting_card"
10
- }
11
- type CIEParams = {
12
- authUrl: string;
13
- onSuccess: OnSuccess;
14
- onError: OnError;
15
- pin: string;
16
- useUat: boolean;
17
- redirectUrl: string;
18
- onEvent: OnCieEvent;
19
- };
20
- /**
21
- * WebViewComponent
22
- *
23
- * Component that manages authentication via CIE L3 (NFC+PIN) based on WebView (react-native-webview).
24
- * In particular, once rendered, it makes a series of calls to the authUrl in the WebView,
25
- * extrapolates the authentication URL necessary for CieManager to sign via certificate
26
- * and calls the CIE SDK which is responsible for starting card reading via NFC.
27
- * At the end of the reading, a redirect is made in the WebView towards the page that asks
28
- * the user for consent to send the data to the Service Provider. This moment can be captured
29
- * via the onUserInteraction parameter. When the user allows or denies their consent,
30
- * a redirect is made to the URL set by the Service Provider.
31
- * This url can be configured using the redirectUrl parameter which allows you to close the WebView.
32
- * The event can then be captured via the onSuccess parameter.
33
- *
34
- * @param {CIEParams} params - Parameters required by the component.
35
- * @param {string} params.authUrl -The authentication URL of the Service Provider to which to authenticate.
36
- * @param {boolean} params.useUat - If set to true it uses the CIE testing environment.
37
- * @param {string} params.pin - CIE pin for use with NFC reading.
38
- * @param {Function} params.onError - Callback function in case of error. The function is passed the Error parameter.
39
- * @param {Function} params.onSuccess - Callback at the end of authentication to which the redirect URL including parameters is passed.
40
- * @param {string} params.redirectUrl - Redirect URL set by the Service Provider. It is used to stop the flow and return to the calling function via onSuccess.
41
- * @param {Function} params.onEvent - Callback function that is called whenever there is a new CieEvent from the CIE reader.
42
- * @returns {JSX.Element} - The configured component with WebView.
43
- */
44
- export declare const WebViewComponent: (params: CIEParams) => React.JSX.Element;
45
- export {};
46
- //# sourceMappingURL=component.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../../src/cie/component.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoB,MAAM,OAAO,CAAC;AAYzC,OAAO,EAAE,QAAQ,EAAgB,MAAM,SAAS,CAAC;AA4BjD,MAAM,MAAM,SAAS,GAAG,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;AAC9C,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,EAAE,QAAQ,KAAK,IAAI,CAAC;AAC5C,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,EAAE,QAAQ,KAAK,IAAI,CAAC;AAC/C,oBAAY,QAAQ;IAClB,SAAS,YAAY;IACrB,WAAW,cAAc;IACzB,cAAc,iBAAiB;CAChC;AAED,KAAK,SAAS,GAAG;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,SAAS,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,OAAO,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,UAAU,CAAC;CACrB,CAAC;AAeF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,gBAAgB,WAAY,SAAS,sBAyHjD,CAAC"}
@@ -1,31 +0,0 @@
1
- export declare enum CieErrorType {
2
- GENERIC = 0,
3
- TAG_NOT_VALID = 1,
4
- WEB_VIEW_ERROR = 2,
5
- NFC_ERROR = 3,
6
- AUTHENTICATION_ERROR = 4,
7
- PIN_ERROR = 5,
8
- PIN_LOCKED = 6,
9
- CERTIFICATE_ERROR = 7
10
- }
11
- interface BaseCieError {
12
- message: string;
13
- type?: CieErrorType;
14
- }
15
- interface PinErrorOptions extends BaseCieError {
16
- type: CieErrorType.PIN_ERROR;
17
- attemptsLeft: number;
18
- }
19
- interface NonPinErrorOptions extends BaseCieError {
20
- type?: Exclude<CieErrorType, CieErrorType.PIN_ERROR>;
21
- attemptsLeft?: number;
22
- }
23
- type ErrorOptions = PinErrorOptions | NonPinErrorOptions;
24
- export declare class CieError extends Error {
25
- type: CieErrorType;
26
- attemptsLeft?: number;
27
- constructor(options: ErrorOptions);
28
- toString(): string;
29
- }
30
- export {};
31
- //# sourceMappingURL=error.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../src/cie/error.ts"],"names":[],"mappings":"AAAA,oBAAY,YAAY;IACtB,OAAO,IAAA;IACP,aAAa,IAAA;IACb,cAAc,IAAA;IACd,SAAS,IAAA;IACT,oBAAoB,IAAA;IACpB,SAAS,IAAA;IACT,UAAU,IAAA;IACV,iBAAiB,IAAA;CAClB;AAED,UAAU,YAAY;IACpB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,YAAY,CAAC;CACrB;AAED,UAAU,eAAgB,SAAQ,YAAY;IAC5C,IAAI,EAAE,YAAY,CAAC,SAAS,CAAC;IAC7B,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,UAAU,kBAAmB,SAAQ,YAAY;IAC/C,IAAI,CAAC,EAAE,OAAO,CAAC,YAAY,EAAE,YAAY,CAAC,SAAS,CAAC,CAAC;IACrD,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,KAAK,YAAY,GAAG,eAAe,GAAG,kBAAkB,CAAC;AAEzD,qBAAa,QAAS,SAAQ,KAAK;IAC1B,IAAI,EAAE,YAAY,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;gBACjB,OAAO,EAAE,YAAY;IAkBjC,QAAQ,IAAI,MAAM;CAQnB"}
@@ -1,4 +0,0 @@
1
- import { CieEvent, WebViewComponent } from "./component";
2
- import { CieError, CieErrorType } from "./error";
3
- export { WebViewComponent, CieError, CieErrorType, CieEvent };
4
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cie/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEjD,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,YAAY,EAAE,QAAQ,EAAE,CAAC"}
@@ -1,5 +0,0 @@
1
- import { type OnCieEvent, type OnError } from "./component";
2
- export type ContinueWithUrl = (callbackUrl: string) => void;
3
- export declare const startCieAndroid: (useCieUat: boolean, ciePin: string, onError: OnError, onEvent: OnCieEvent, cieAuthorizationUri: string, continueWithUrl: ContinueWithUrl) => void;
4
- export declare const startCieiOS: (useCieUat: boolean, ciePin: string, onError: OnError, onEvent: OnCieEvent, cieAuthorizationUri: string, continueWithUrl: ContinueWithUrl) => Promise<void>;
5
- //# sourceMappingURL=manager.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../../src/cie/manager.ts"],"names":[],"mappings":"AAEA,OAAO,EAAY,KAAK,UAAU,EAAE,KAAK,OAAO,EAAE,MAAM,aAAa,CAAC;AAKtE,MAAM,MAAM,eAAe,GAAG,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;AAE5D,eAAO,MAAM,eAAe,cACf,OAAO,UACV,MAAM,WACL,OAAO,WACP,UAAU,uBACE,MAAM,mBACV,eAAe,SA6BjC,CAAC;AAEF,eAAO,MAAM,WAAW,cACX,OAAO,UACV,MAAM,WACL,OAAO,WACP,UAAU,uBACE,MAAM,mBACV,eAAe,kBA4BjC,CAAC"}
package/src/cie/README.md DELETED
@@ -1,6 +0,0 @@
1
- # CIE
2
-
3
- This library provides a components and a set of utilities to interact with the physical [CIE (Carta d'Identità Elettronica)](https://www.cartaidentita.interno.gov.it/) card. It can be used to [obtain an eID](../credential/issuance/README.md) via strong authentication.
4
- Under the hood it uses [@pagopa/react-native-cie](https://github.com/pagopa/io-cie-sdk) to interact with the card and [react-native-webview](https://github.com/react-native-webview/react-native-webview) to complete the authorization flow.
5
-
6
- An example of usage can be found in the [example](./example) folder of this repository.