sunuid-sdk 1.0.52 → 1.0.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/sunuid-sdk.esm.js +21 -24
- package/dist/sunuid-sdk.esm.js.map +1 -1
- package/dist/sunuid-sdk.js +21 -24
- package/dist/sunuid-sdk.js.map +1 -1
- package/dist/sunuid-sdk.min.js +3 -3
- package/dist/sunuid-sdk.min.js.map +1 -1
- package/docs/SECURITY_GUIDE.md +4 -3
- package/examples/.htaccess.example +9 -6
- package/examples/partner-name-config.js +3 -3
- package/examples/production-config.js +1 -1
- package/examples/secure-init.php +154 -0
- package/examples/secure-integration-example.js +2 -2
- package/examples/secure-integration.html +1 -1
- package/examples/test-production.html +3 -3
- package/package.json +9 -9
- package/examples/basic-usage.php +0 -42
- package/examples/local-qr.php +0 -49
- package/examples/secure-usage.php +0 -309
- package/examples/web-integration.php +0 -138
package/dist/sunuid-sdk.js
CHANGED
|
@@ -40,20 +40,20 @@
|
|
|
40
40
|
function _defineProperties(e, r) {
|
|
41
41
|
for (var t = 0; t < r.length; t++) {
|
|
42
42
|
var o = r[t];
|
|
43
|
-
o.enumerable = o.enumerable ||
|
|
43
|
+
o.enumerable = o.enumerable || false, o.configurable = true, "value" in o && (o.writable = true), Object.defineProperty(e, _toPropertyKey(o.key), o);
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
function _createClass(e, r, t) {
|
|
47
|
-
return r && _defineProperties(e.prototype, r),
|
|
48
|
-
writable:
|
|
47
|
+
return r && _defineProperties(e.prototype, r), Object.defineProperty(e, "prototype", {
|
|
48
|
+
writable: false
|
|
49
49
|
}), e;
|
|
50
50
|
}
|
|
51
51
|
function _defineProperty(e, r, t) {
|
|
52
52
|
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
53
53
|
value: t,
|
|
54
|
-
enumerable:
|
|
55
|
-
configurable:
|
|
56
|
-
writable:
|
|
54
|
+
enumerable: true,
|
|
55
|
+
configurable: true,
|
|
56
|
+
writable: true
|
|
57
57
|
}) : e[r] = t, e;
|
|
58
58
|
}
|
|
59
59
|
function _iterableToArrayLimit(r, l) {
|
|
@@ -64,15 +64,12 @@
|
|
|
64
64
|
i,
|
|
65
65
|
u,
|
|
66
66
|
a = [],
|
|
67
|
-
f =
|
|
68
|
-
o =
|
|
67
|
+
f = true,
|
|
68
|
+
o = false;
|
|
69
69
|
try {
|
|
70
|
-
if (i = (t = t.call(r)).next, 0 === l)
|
|
71
|
-
if (Object(t) !== t) return;
|
|
72
|
-
f = !1;
|
|
73
|
-
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
70
|
+
if (i = (t = t.call(r)).next, 0 === l) ; else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
74
71
|
} catch (r) {
|
|
75
|
-
o =
|
|
72
|
+
o = true, n = r;
|
|
76
73
|
} finally {
|
|
77
74
|
try {
|
|
78
75
|
if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return;
|
|
@@ -99,7 +96,7 @@
|
|
|
99
96
|
function _objectSpread2(e) {
|
|
100
97
|
for (var r = 1; r < arguments.length; r++) {
|
|
101
98
|
var t = null != arguments[r] ? arguments[r] : {};
|
|
102
|
-
r % 2 ? ownKeys(Object(t),
|
|
99
|
+
r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
|
|
103
100
|
_defineProperty(e, r, t[r]);
|
|
104
101
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
105
102
|
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
@@ -123,7 +120,7 @@
|
|
|
123
120
|
u,
|
|
124
121
|
f = 0,
|
|
125
122
|
p = o || [],
|
|
126
|
-
y =
|
|
123
|
+
y = false,
|
|
127
124
|
G = {
|
|
128
125
|
p: 0,
|
|
129
126
|
n: 0,
|
|
@@ -143,7 +140,7 @@
|
|
|
143
140
|
r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0));
|
|
144
141
|
}
|
|
145
142
|
if (o || r > 1) return a;
|
|
146
|
-
throw y =
|
|
143
|
+
throw y = true, n;
|
|
147
144
|
}
|
|
148
145
|
return function (o, p, l) {
|
|
149
146
|
if (f > 1) throw TypeError("Generator is already running");
|
|
@@ -169,7 +166,7 @@
|
|
|
169
166
|
done: y
|
|
170
167
|
};
|
|
171
168
|
};
|
|
172
|
-
}(r, o, i),
|
|
169
|
+
}(r, o, i), true), u;
|
|
173
170
|
}
|
|
174
171
|
var a = {};
|
|
175
172
|
function Generator() {}
|
|
@@ -239,11 +236,11 @@
|
|
|
239
236
|
if ("object" != typeof t || !t) return t;
|
|
240
237
|
var e = t[Symbol.toPrimitive];
|
|
241
238
|
if (void 0 !== e) {
|
|
242
|
-
var i = e.call(t, r
|
|
239
|
+
var i = e.call(t, r);
|
|
243
240
|
if ("object" != typeof i) return i;
|
|
244
241
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
245
242
|
}
|
|
246
|
-
return (
|
|
243
|
+
return (String )(t);
|
|
247
244
|
}
|
|
248
245
|
function _toPropertyKey(t) {
|
|
249
246
|
var i = _toPrimitive(t, "string");
|
|
@@ -307,9 +304,9 @@
|
|
|
307
304
|
secureInit: false,
|
|
308
305
|
secureInitUrl: function (_window$SunuIDConfig2, _window$SunuIDConfig3) {
|
|
309
306
|
if ((_window$SunuIDConfig2 = window.SunuIDConfig) !== null && _window$SunuIDConfig2 !== void 0 && (_window$SunuIDConfig2 = _window$SunuIDConfig2.apiUrl) !== null && _window$SunuIDConfig2 !== void 0 && _window$SunuIDConfig2.includes('api.sunuid.fayma.sn')) {
|
|
310
|
-
return 'https://api.sunuid.fayma.sn/secure-init
|
|
307
|
+
return 'https://api.sunuid.fayma.sn/secure-init';
|
|
311
308
|
}
|
|
312
|
-
return ((_window$SunuIDConfig3 = window.SunuIDConfig) === null || _window$SunuIDConfig3 === void 0 || (_window$SunuIDConfig3 = _window$SunuIDConfig3.apiUrl) === null || _window$SunuIDConfig3 === void 0 ? void 0 : _window$SunuIDConfig3.replace('/api', '')) + '/secure-init
|
|
309
|
+
return ((_window$SunuIDConfig3 = window.SunuIDConfig) === null || _window$SunuIDConfig3 === void 0 || (_window$SunuIDConfig3 = _window$SunuIDConfig3.apiUrl) === null || _window$SunuIDConfig3 === void 0 ? void 0 : _window$SunuIDConfig3.replace('/api', '')) + '/secure-init' || 'https://api.sunuid.fayma.sn/secure-init';
|
|
313
310
|
}(),
|
|
314
311
|
token: null,
|
|
315
312
|
// Configuration pour forcer l'utilisation du serveur distant
|
|
@@ -477,7 +474,7 @@
|
|
|
477
474
|
return _doInit;
|
|
478
475
|
}()
|
|
479
476
|
/**
|
|
480
|
-
* Initialisation sécurisée via
|
|
477
|
+
* Initialisation sécurisée via endpoint serveur
|
|
481
478
|
*/
|
|
482
479
|
)
|
|
483
480
|
}, {
|
|
@@ -1562,7 +1559,7 @@
|
|
|
1562
1559
|
}
|
|
1563
1560
|
|
|
1564
1561
|
/**
|
|
1565
|
-
* Générer un QR code personnalisé avec
|
|
1562
|
+
* Générer un QR code personnalisé avec bibliothèque locale
|
|
1566
1563
|
*/
|
|
1567
1564
|
}, {
|
|
1568
1565
|
key: "generateCustomQRCode",
|
|
@@ -1694,7 +1691,7 @@
|
|
|
1694
1691
|
return generateQRClientSide;
|
|
1695
1692
|
}()
|
|
1696
1693
|
/**
|
|
1697
|
-
* Générer un QR code via endpoint
|
|
1694
|
+
* Générer un QR code via endpoint serveur (fallback)
|
|
1698
1695
|
*/
|
|
1699
1696
|
)
|
|
1700
1697
|
}, {
|