@opencampus/ocid-connect-js 1.2.3 → 1.2.6
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 +11 -7
- package/dist/ocid-connect-js.js +165 -74
- package/dist/ocid-connect-js.js.map +1 -1
- package/lib/index.d.ts +2 -0
- package/lib/react/LoginButton.d.ts +6 -0
- package/lib/react/LoginCallBack.d.ts +7 -0
- package/lib/react/LoginCallBack.js +2 -1
- package/lib/react/OCConnect.d.ts +7 -0
- package/lib/react/OCConnect.js +12 -8
- package/lib/react/OCContext.d.ts +3 -0
- package/lib/react/index.d.ts +4 -0
- package/lib/sdk/auth.d.ts +31 -0
- package/lib/sdk/auth.js +3 -3
- package/lib/sdk/crypto/base64.d.ts +5 -0
- package/lib/sdk/crypto/index.d.ts +3 -0
- package/lib/sdk/crypto/verifyToken.d.ts +1 -0
- package/lib/sdk/crypto/webcrypto.d.ts +13 -0
- package/lib/sdk/endpoints/buildAuthEndpointUrl.d.ts +1 -0
- package/lib/sdk/endpoints/index.d.ts +1 -0
- package/lib/sdk/index.d.ts +2 -0
- package/lib/sdk/lib/AuthInfoManager.d.ts +11 -0
- package/lib/sdk/lib/AuthInfoManager.js +4 -1
- package/lib/sdk/lib/CookieStorageProvider.d.ts +8 -0
- package/lib/sdk/lib/CookieStorageProvider.js +16 -5
- package/lib/sdk/lib/StorageManager.d.ts +23 -0
- package/lib/sdk/lib/StorageManager.js +1 -1
- package/lib/sdk/lib/TokenManager.d.ts +16 -0
- package/lib/sdk/lib/TransactionManager.d.ts +9 -0
- package/lib/sdk/lib/index.d.ts +3 -0
- package/lib/sdk/lib/pkce.d.ts +11 -0
- package/lib/sdk/utils/createPkceMeta.d.ts +5 -0
- package/lib/sdk/utils/errors.d.ts +15 -0
- package/lib/sdk/utils/index.d.ts +4 -0
- package/lib/sdk/utils/jwtParser.d.ts +1 -0
- package/lib/sdk/utils/prepareTokenParams.d.ts +8 -0
- package/lib/sdk/utils/urlParser.d.ts +5 -0
- package/package.json +6 -2
package/dist/ocid-connect-js.js
CHANGED
|
@@ -111,7 +111,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
111
111
|
|
|
112
112
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "useOCAuth", function() { return _react__WEBPACK_IMPORTED_MODULE_0__["useOCAuth"]; });
|
|
113
113
|
|
|
114
|
-
/* harmony import */ var _sdk__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
114
|
+
/* harmony import */ var _sdk__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(28);
|
|
115
115
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TokenManager", function() { return _sdk__WEBPACK_IMPORTED_MODULE_1__["TokenManager"]; });
|
|
116
116
|
|
|
117
117
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TransactionManager", function() { return _sdk__WEBPACK_IMPORTED_MODULE_1__["TransactionManager"]; });
|
|
@@ -358,6 +358,7 @@ var LoginCallBack = function LoginCallBack(_ref) {
|
|
|
358
358
|
customErrorComponent = _ref.customErrorComponent,
|
|
359
359
|
customLoadingComponent = _ref.customLoadingComponent;
|
|
360
360
|
var _useOCAuth = Object(_OCContext__WEBPACK_IMPORTED_MODULE_1__["useOCAuth"])(),
|
|
361
|
+
isInitialized = _useOCAuth.isInitialized,
|
|
361
362
|
ocAuth = _useOCAuth.ocAuth,
|
|
362
363
|
authState = _useOCAuth.authState,
|
|
363
364
|
setAuthError = _useOCAuth.setAuthError;
|
|
@@ -399,7 +400,7 @@ var LoginCallBack = function LoginCallBack(_ref) {
|
|
|
399
400
|
handleLogin();
|
|
400
401
|
}
|
|
401
402
|
}, [ocAuth]);
|
|
402
|
-
if (authState.error !== undefined && !errorCallback) {
|
|
403
|
+
if (isInitialized && authState.error !== undefined && !errorCallback) {
|
|
403
404
|
return customErrorComponent ? customErrorComponent : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, "Error Logging in: ", authState.error.message);
|
|
404
405
|
} else {
|
|
405
406
|
return customLoadingComponent ? customLoadingComponent : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("div", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("h3", null, "Loading ......"));
|
|
@@ -439,7 +440,7 @@ var OCConnect = function OCConnect(_ref) {
|
|
|
439
440
|
var children = _ref.children,
|
|
440
441
|
opts = _ref.opts,
|
|
441
442
|
sandboxMode = _ref.sandboxMode;
|
|
442
|
-
var _useState = Object(react__WEBPACK_IMPORTED_MODULE_0__["useState"])(
|
|
443
|
+
var _useState = Object(react__WEBPACK_IMPORTED_MODULE_0__["useState"])(),
|
|
443
444
|
_useState2 = _slicedToArray(_useState, 2),
|
|
444
445
|
ocAuth = _useState2[0],
|
|
445
446
|
setOcAuth = _useState2[1];
|
|
@@ -451,16 +452,18 @@ var OCConnect = function OCConnect(_ref) {
|
|
|
451
452
|
_useState6 = _slicedToArray(_useState5, 2),
|
|
452
453
|
ethAddress = _useState6[0],
|
|
453
454
|
setEthAddress = _useState6[1];
|
|
454
|
-
var _useState7 = Object(react__WEBPACK_IMPORTED_MODULE_0__["useState"])(
|
|
455
|
-
isAuthenticated: false
|
|
456
|
-
}),
|
|
455
|
+
var _useState7 = Object(react__WEBPACK_IMPORTED_MODULE_0__["useState"])(),
|
|
457
456
|
_useState8 = _slicedToArray(_useState7, 2),
|
|
458
457
|
authState = _useState8[0],
|
|
459
458
|
setAuthState = _useState8[1];
|
|
460
|
-
var _useState9 = Object(react__WEBPACK_IMPORTED_MODULE_0__["useState"])(
|
|
459
|
+
var _useState9 = Object(react__WEBPACK_IMPORTED_MODULE_0__["useState"])(false),
|
|
461
460
|
_useState10 = _slicedToArray(_useState9, 2),
|
|
462
|
-
|
|
463
|
-
|
|
461
|
+
isInitialized = _useState10[0],
|
|
462
|
+
setIsInitialized = _useState10[1];
|
|
463
|
+
var _useState11 = Object(react__WEBPACK_IMPORTED_MODULE_0__["useState"])(null),
|
|
464
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
465
|
+
authError = _useState12[0],
|
|
466
|
+
setAuthError = _useState12[1];
|
|
464
467
|
var updateAuthState = function updateAuthState(authState) {
|
|
465
468
|
setAuthState(authState);
|
|
466
469
|
setOCId(authState.OCId);
|
|
@@ -472,9 +475,10 @@ var OCConnect = function OCConnect(_ref) {
|
|
|
472
475
|
var authSdk = sandboxMode ? new _sdk_auth__WEBPACK_IMPORTED_MODULE_2__["OCAuthSandbox"](opts) : new _sdk_auth__WEBPACK_IMPORTED_MODULE_2__["OCAuthLive"](opts);
|
|
473
476
|
updateAuthState(authSdk.getAuthState());
|
|
474
477
|
setOcAuth(authSdk);
|
|
478
|
+
setIsInitialized(true);
|
|
475
479
|
}, []);
|
|
476
480
|
Object(react__WEBPACK_IMPORTED_MODULE_0__["useEffect"])(function () {
|
|
477
|
-
if (ocAuth.authInfoManager) {
|
|
481
|
+
if (ocAuth && ocAuth.authInfoManager) {
|
|
478
482
|
// reactively recieve update on the authstate change
|
|
479
483
|
ocAuth.authInfoManager.subscribe(updateAuthState);
|
|
480
484
|
return function () {
|
|
@@ -489,6 +493,7 @@ var OCConnect = function OCConnect(_ref) {
|
|
|
489
493
|
ocAuth: ocAuth,
|
|
490
494
|
authState: authState,
|
|
491
495
|
authError: authError,
|
|
496
|
+
isInitialized: isInitialized,
|
|
492
497
|
setAuthError: setAuthError
|
|
493
498
|
}
|
|
494
499
|
}, children);
|
|
@@ -505,12 +510,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
505
510
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OCAuthLive", function() { return OCAuthLive; });
|
|
506
511
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "OCAuthSandbox", function() { return OCAuthSandbox; });
|
|
507
512
|
/* harmony import */ var _lib_AuthInfoManager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(8);
|
|
508
|
-
/* harmony import */ var _lib_TokenManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
509
|
-
/* harmony import */ var _lib_TransactionManager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
510
|
-
/* harmony import */ var _lib_StorageManager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
511
|
-
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(
|
|
512
|
-
/* harmony import */ var _endpoints__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(
|
|
513
|
-
/* harmony import */ var _utils_errors__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(
|
|
513
|
+
/* harmony import */ var _lib_TokenManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(10);
|
|
514
|
+
/* harmony import */ var _lib_TransactionManager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(22);
|
|
515
|
+
/* harmony import */ var _lib_StorageManager__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(23);
|
|
516
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(11);
|
|
517
|
+
/* harmony import */ var _endpoints__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(26);
|
|
518
|
+
/* harmony import */ var _utils_errors__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(19);
|
|
514
519
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
515
520
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
516
521
|
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
@@ -682,7 +687,7 @@ var OCAuthCore = /*#__PURE__*/function () {
|
|
|
682
687
|
var _this$getParsedIdToke = this.getParsedIdToken(),
|
|
683
688
|
edu_username = _this$getParsedIdToke.edu_username,
|
|
684
689
|
eth_address = _this$getParsedIdToke.eth_address;
|
|
685
|
-
this.authInfoManager.setAuthState(this.getAccessToken(), this.getIdToken(), edu_username, eth_address,
|
|
690
|
+
this.authInfoManager.setAuthState(this.getAccessToken(), this.getIdToken(), edu_username, eth_address, true);
|
|
686
691
|
}
|
|
687
692
|
}
|
|
688
693
|
}, {
|
|
@@ -760,7 +765,7 @@ var OCAuthLive = /*#__PURE__*/function (_OCAuthCore2) {
|
|
|
760
765
|
var storageClass = Object(_lib_StorageManager__WEBPACK_IMPORTED_MODULE_3__["getStorageClass"])(opts);
|
|
761
766
|
var pkceTransactionManager = new _lib_TransactionManager__WEBPACK_IMPORTED_MODULE_2__["default"](storageClass);
|
|
762
767
|
var tokenManager = new _lib_TokenManager__WEBPACK_IMPORTED_MODULE_1__["default"](storageClass, tokenEndpoint, publicKey);
|
|
763
|
-
return _callSuper(this, OCAuthLive, [loginEndpoint, redirectUri, pkceTransactionManager, tokenManager, referralCode, logoutEndpoint]);
|
|
768
|
+
return _callSuper(this, OCAuthLive, [loginEndpoint, redirectUri, pkceTransactionManager, tokenManager, referralCode, logoutEndpoint, false]);
|
|
764
769
|
}
|
|
765
770
|
_inherits(OCAuthLive, _OCAuthCore2);
|
|
766
771
|
return _createClass(OCAuthLive);
|
|
@@ -782,7 +787,7 @@ var OCAuthSandbox = /*#__PURE__*/function (_OCAuthCore3) {
|
|
|
782
787
|
var storageClass = Object(_lib_StorageManager__WEBPACK_IMPORTED_MODULE_3__["getStorageClass"])(opts);
|
|
783
788
|
var pkceTransactionManager = new _lib_TransactionManager__WEBPACK_IMPORTED_MODULE_2__["default"](storageClass);
|
|
784
789
|
var tokenManager = new _lib_TokenManager__WEBPACK_IMPORTED_MODULE_1__["default"](storageClass, tokenEndpoint, publicKey);
|
|
785
|
-
return _callSuper(this, OCAuthSandbox, [loginEndpoint, redirectUri, pkceTransactionManager, tokenManager, referralCode, logoutEndpoint]);
|
|
790
|
+
return _callSuper(this, OCAuthSandbox, [loginEndpoint, redirectUri, pkceTransactionManager, tokenManager, referralCode, logoutEndpoint, true]);
|
|
786
791
|
}
|
|
787
792
|
_inherits(OCAuthSandbox, _OCAuthCore3);
|
|
788
793
|
return _createClass(OCAuthSandbox);
|
|
@@ -794,7 +799,8 @@ var OCAuthSandbox = /*#__PURE__*/function (_OCAuthCore3) {
|
|
|
794
799
|
|
|
795
800
|
"use strict";
|
|
796
801
|
__webpack_require__.r(__webpack_exports__);
|
|
797
|
-
|
|
802
|
+
/* harmony import */ var tiny_emitter__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9);
|
|
803
|
+
/* harmony import */ var tiny_emitter__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(tiny_emitter__WEBPACK_IMPORTED_MODULE_0__);
|
|
798
804
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
799
805
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
800
806
|
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
@@ -820,7 +826,7 @@ var AuthInfoManager = /*#__PURE__*/function () {
|
|
|
820
826
|
_defineProperty(this, "_emmitter", void 0);
|
|
821
827
|
_defineProperty(this, "_authState", void 0);
|
|
822
828
|
this._authState = null;
|
|
823
|
-
this._emitter = new
|
|
829
|
+
this._emitter = new tiny_emitter__WEBPACK_IMPORTED_MODULE_0___default.a();
|
|
824
830
|
}
|
|
825
831
|
return _createClass(AuthInfoManager, [{
|
|
826
832
|
key: "setAuthState",
|
|
@@ -842,7 +848,10 @@ var AuthInfoManager = /*#__PURE__*/function () {
|
|
|
842
848
|
}, {
|
|
843
849
|
key: "clear",
|
|
844
850
|
value: function clear() {
|
|
845
|
-
this._authState =
|
|
851
|
+
this._authState = {
|
|
852
|
+
isAuthenticated: false
|
|
853
|
+
};
|
|
854
|
+
this._emitter.emit(EVENT_AUTH_STATE_CHANGE, this._authState);
|
|
846
855
|
}
|
|
847
856
|
}, {
|
|
848
857
|
key: "subscribe",
|
|
@@ -860,13 +869,86 @@ var AuthInfoManager = /*#__PURE__*/function () {
|
|
|
860
869
|
|
|
861
870
|
/***/ }),
|
|
862
871
|
/* 9 */
|
|
872
|
+
/***/ (function(module, exports) {
|
|
873
|
+
|
|
874
|
+
function E () {
|
|
875
|
+
// Keep this empty so it's easier to inherit from
|
|
876
|
+
// (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
E.prototype = {
|
|
880
|
+
on: function (name, callback, ctx) {
|
|
881
|
+
var e = this.e || (this.e = {});
|
|
882
|
+
|
|
883
|
+
(e[name] || (e[name] = [])).push({
|
|
884
|
+
fn: callback,
|
|
885
|
+
ctx: ctx
|
|
886
|
+
});
|
|
887
|
+
|
|
888
|
+
return this;
|
|
889
|
+
},
|
|
890
|
+
|
|
891
|
+
once: function (name, callback, ctx) {
|
|
892
|
+
var self = this;
|
|
893
|
+
function listener () {
|
|
894
|
+
self.off(name, listener);
|
|
895
|
+
callback.apply(ctx, arguments);
|
|
896
|
+
};
|
|
897
|
+
|
|
898
|
+
listener._ = callback
|
|
899
|
+
return this.on(name, listener, ctx);
|
|
900
|
+
},
|
|
901
|
+
|
|
902
|
+
emit: function (name) {
|
|
903
|
+
var data = [].slice.call(arguments, 1);
|
|
904
|
+
var evtArr = ((this.e || (this.e = {}))[name] || []).slice();
|
|
905
|
+
var i = 0;
|
|
906
|
+
var len = evtArr.length;
|
|
907
|
+
|
|
908
|
+
for (i; i < len; i++) {
|
|
909
|
+
evtArr[i].fn.apply(evtArr[i].ctx, data);
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
return this;
|
|
913
|
+
},
|
|
914
|
+
|
|
915
|
+
off: function (name, callback) {
|
|
916
|
+
var e = this.e || (this.e = {});
|
|
917
|
+
var evts = e[name];
|
|
918
|
+
var liveEvents = [];
|
|
919
|
+
|
|
920
|
+
if (evts && callback) {
|
|
921
|
+
for (var i = 0, len = evts.length; i < len; i++) {
|
|
922
|
+
if (evts[i].fn !== callback && evts[i].fn._ !== callback)
|
|
923
|
+
liveEvents.push(evts[i]);
|
|
924
|
+
}
|
|
925
|
+
}
|
|
926
|
+
|
|
927
|
+
// Remove event from queue to prevent memory leak
|
|
928
|
+
// Suggested by https://github.com/lazd
|
|
929
|
+
// Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910
|
|
930
|
+
|
|
931
|
+
(liveEvents.length)
|
|
932
|
+
? e[name] = liveEvents
|
|
933
|
+
: delete e[name];
|
|
934
|
+
|
|
935
|
+
return this;
|
|
936
|
+
}
|
|
937
|
+
};
|
|
938
|
+
|
|
939
|
+
module.exports = E;
|
|
940
|
+
module.exports.TinyEmitter = E;
|
|
941
|
+
|
|
942
|
+
|
|
943
|
+
/***/ }),
|
|
944
|
+
/* 10 */
|
|
863
945
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
864
946
|
|
|
865
947
|
"use strict";
|
|
866
948
|
__webpack_require__.r(__webpack_exports__);
|
|
867
|
-
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
868
|
-
/* harmony import */ var _crypto__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
869
|
-
/* harmony import */ var _utils_errors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
949
|
+
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(11);
|
|
950
|
+
/* harmony import */ var _crypto__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(15);
|
|
951
|
+
/* harmony import */ var _utils_errors__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(19);
|
|
870
952
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
871
953
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
872
954
|
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
@@ -1048,21 +1130,21 @@ var TokenManager = /*#__PURE__*/function () {
|
|
|
1048
1130
|
/* harmony default export */ __webpack_exports__["default"] = (TokenManager);
|
|
1049
1131
|
|
|
1050
1132
|
/***/ }),
|
|
1051
|
-
/*
|
|
1133
|
+
/* 11 */
|
|
1052
1134
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1053
1135
|
|
|
1054
1136
|
"use strict";
|
|
1055
1137
|
__webpack_require__.r(__webpack_exports__);
|
|
1056
|
-
/* harmony import */ var _urlParser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
1138
|
+
/* harmony import */ var _urlParser__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(12);
|
|
1057
1139
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "parseUrl", function() { return _urlParser__WEBPACK_IMPORTED_MODULE_0__["parseUrl"]; });
|
|
1058
1140
|
|
|
1059
|
-
/* harmony import */ var _prepareTokenParams__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
1141
|
+
/* harmony import */ var _prepareTokenParams__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(13);
|
|
1060
1142
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "prepareTokenParams", function() { return _prepareTokenParams__WEBPACK_IMPORTED_MODULE_1__["prepareTokenParams"]; });
|
|
1061
1143
|
|
|
1062
|
-
/* harmony import */ var _createPkceMeta__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
1144
|
+
/* harmony import */ var _createPkceMeta__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(20);
|
|
1063
1145
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "createPkceMeta", function() { return _createPkceMeta__WEBPACK_IMPORTED_MODULE_2__["createPkceMeta"]; });
|
|
1064
1146
|
|
|
1065
|
-
/* harmony import */ var _jwtParser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(
|
|
1147
|
+
/* harmony import */ var _jwtParser__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(21);
|
|
1066
1148
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "parseJwt", function() { return _jwtParser__WEBPACK_IMPORTED_MODULE_3__["parseJwt"]; });
|
|
1067
1149
|
|
|
1068
1150
|
/*!
|
|
@@ -1080,7 +1162,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1080
1162
|
|
|
1081
1163
|
|
|
1082
1164
|
/***/ }),
|
|
1083
|
-
/*
|
|
1165
|
+
/* 12 */
|
|
1084
1166
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1085
1167
|
|
|
1086
1168
|
"use strict";
|
|
@@ -1106,14 +1188,14 @@ var parseUrl = function parseUrl() {
|
|
|
1106
1188
|
};
|
|
1107
1189
|
|
|
1108
1190
|
/***/ }),
|
|
1109
|
-
/*
|
|
1191
|
+
/* 13 */
|
|
1110
1192
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1111
1193
|
|
|
1112
1194
|
"use strict";
|
|
1113
1195
|
__webpack_require__.r(__webpack_exports__);
|
|
1114
1196
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "prepareTokenParams", function() { return prepareTokenParams; });
|
|
1115
|
-
/* harmony import */ var _lib_pkce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
1116
|
-
/* harmony import */ var _errors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
1197
|
+
/* harmony import */ var _lib_pkce__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(14);
|
|
1198
|
+
/* harmony import */ var _errors__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(19);
|
|
1117
1199
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
1118
1200
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
1119
1201
|
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
@@ -1177,7 +1259,7 @@ var prepareTokenParams = /*#__PURE__*/function () {
|
|
|
1177
1259
|
}();
|
|
1178
1260
|
|
|
1179
1261
|
/***/ }),
|
|
1180
|
-
/*
|
|
1262
|
+
/* 14 */
|
|
1181
1263
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1182
1264
|
|
|
1183
1265
|
"use strict";
|
|
@@ -1185,7 +1267,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1185
1267
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MIN_VERIFIER_LENGTH", function() { return MIN_VERIFIER_LENGTH; });
|
|
1186
1268
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "MAX_VERIFIER_LENGTH", function() { return MAX_VERIFIER_LENGTH; });
|
|
1187
1269
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "DEFAULT_CODE_CHALLENGE_METHOD", function() { return DEFAULT_CODE_CHALLENGE_METHOD; });
|
|
1188
|
-
/* harmony import */ var _crypto__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
1270
|
+
/* harmony import */ var _crypto__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(15);
|
|
1189
1271
|
/*!
|
|
1190
1272
|
* Copyright 2024-Present Animoca Brands Corporation Ltd.
|
|
1191
1273
|
*
|
|
@@ -1233,19 +1315,19 @@ function computeChallenge(str) {
|
|
|
1233
1315
|
});
|
|
1234
1316
|
|
|
1235
1317
|
/***/ }),
|
|
1236
|
-
/*
|
|
1318
|
+
/* 15 */
|
|
1237
1319
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1238
1320
|
|
|
1239
1321
|
"use strict";
|
|
1240
1322
|
__webpack_require__.r(__webpack_exports__);
|
|
1241
|
-
/* harmony import */ var _webcrypto__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
1323
|
+
/* harmony import */ var _webcrypto__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16);
|
|
1242
1324
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "atob", function() { return _webcrypto__WEBPACK_IMPORTED_MODULE_0__["atob"]; });
|
|
1243
1325
|
|
|
1244
1326
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "btoa", function() { return _webcrypto__WEBPACK_IMPORTED_MODULE_0__["btoa"]; });
|
|
1245
1327
|
|
|
1246
1328
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "webcrypto", function() { return _webcrypto__WEBPACK_IMPORTED_MODULE_0__["webcrypto"]; });
|
|
1247
1329
|
|
|
1248
|
-
/* harmony import */ var _base64__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
1330
|
+
/* harmony import */ var _base64__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(17);
|
|
1249
1331
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "base64ToBase64Url", function() { return _base64__WEBPACK_IMPORTED_MODULE_1__["base64ToBase64Url"]; });
|
|
1250
1332
|
|
|
1251
1333
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "base64UrlToBase64", function() { return _base64__WEBPACK_IMPORTED_MODULE_1__["base64UrlToBase64"]; });
|
|
@@ -1256,7 +1338,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1256
1338
|
|
|
1257
1339
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "base64UrlDecode", function() { return _base64__WEBPACK_IMPORTED_MODULE_1__["base64UrlDecode"]; });
|
|
1258
1340
|
|
|
1259
|
-
/* harmony import */ var _verifyToken__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
1341
|
+
/* harmony import */ var _verifyToken__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(18);
|
|
1260
1342
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "verifyToken", function() { return _verifyToken__WEBPACK_IMPORTED_MODULE_2__["verifyToken"]; });
|
|
1261
1343
|
|
|
1262
1344
|
/*!
|
|
@@ -1273,7 +1355,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1273
1355
|
|
|
1274
1356
|
|
|
1275
1357
|
/***/ }),
|
|
1276
|
-
/*
|
|
1358
|
+
/* 16 */
|
|
1277
1359
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1278
1360
|
|
|
1279
1361
|
"use strict";
|
|
@@ -1303,7 +1385,7 @@ var c = typeof crypto === 'undefined' ? null : crypto;
|
|
|
1303
1385
|
|
|
1304
1386
|
|
|
1305
1387
|
/***/ }),
|
|
1306
|
-
/*
|
|
1388
|
+
/* 17 */
|
|
1307
1389
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1308
1390
|
|
|
1309
1391
|
"use strict";
|
|
@@ -1313,7 +1395,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1313
1395
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stringToBase64Url", function() { return stringToBase64Url; });
|
|
1314
1396
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "stringToBuffer", function() { return stringToBuffer; });
|
|
1315
1397
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "base64UrlDecode", function() { return base64UrlDecode; });
|
|
1316
|
-
/* harmony import */ var _webcrypto__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
1398
|
+
/* harmony import */ var _webcrypto__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(16);
|
|
1317
1399
|
/*!
|
|
1318
1400
|
* Copyright 2024-Present Animoca Brands Corporation Ltd.
|
|
1319
1401
|
*
|
|
@@ -1352,14 +1434,14 @@ function base64UrlDecode(str) {
|
|
|
1352
1434
|
}
|
|
1353
1435
|
|
|
1354
1436
|
/***/ }),
|
|
1355
|
-
/*
|
|
1437
|
+
/* 18 */
|
|
1356
1438
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1357
1439
|
|
|
1358
1440
|
"use strict";
|
|
1359
1441
|
__webpack_require__.r(__webpack_exports__);
|
|
1360
1442
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "verifyToken", function() { return verifyToken; });
|
|
1361
|
-
/* harmony import */ var _base64__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
1362
|
-
/* harmony import */ var _webcrypto__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
1443
|
+
/* harmony import */ var _base64__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(17);
|
|
1444
|
+
/* harmony import */ var _webcrypto__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(16);
|
|
1363
1445
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
1364
1446
|
function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return e; }; var t, e = {}, r = Object.prototype, n = r.hasOwnProperty, o = Object.defineProperty || function (t, e, r) { t[e] = r.value; }, i = "function" == typeof Symbol ? Symbol : {}, a = i.iterator || "@@iterator", c = i.asyncIterator || "@@asyncIterator", u = i.toStringTag || "@@toStringTag"; function define(t, e, r) { return Object.defineProperty(t, e, { value: r, enumerable: !0, configurable: !0, writable: !0 }), t[e]; } try { define({}, ""); } catch (t) { define = function define(t, e, r) { return t[e] = r; }; } function wrap(t, e, r, n) { var i = e && e.prototype instanceof Generator ? e : Generator, a = Object.create(i.prototype), c = new Context(n || []); return o(a, "_invoke", { value: makeInvokeMethod(t, r, c) }), a; } function tryCatch(t, e, r) { try { return { type: "normal", arg: t.call(e, r) }; } catch (t) { return { type: "throw", arg: t }; } } e.wrap = wrap; var h = "suspendedStart", l = "suspendedYield", f = "executing", s = "completed", y = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var p = {}; define(p, a, function () { return this; }); var d = Object.getPrototypeOf, v = d && d(d(values([]))); v && v !== r && n.call(v, a) && (p = v); var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p); function defineIteratorMethods(t) { ["next", "throw", "return"].forEach(function (e) { define(t, e, function (t) { return this._invoke(e, t); }); }); } function AsyncIterator(t, e) { function invoke(r, o, i, a) { var c = tryCatch(t[r], t, o); if ("throw" !== c.type) { var u = c.arg, h = u.value; return h && "object" == _typeof(h) && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) { invoke("next", t, i, a); }, function (t) { invoke("throw", t, i, a); }) : e.resolve(h).then(function (t) { u.value = t, i(u); }, function (t) { return invoke("throw", t, i, a); }); } a(c.arg); } var r; o(this, "_invoke", { value: function value(t, n) { function callInvokeWithMethodAndArg() { return new e(function (e, r) { invoke(t, n, e, r); }); } return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(e, r, n) { var o = h; return function (i, a) { if (o === f) throw Error("Generator is already running"); if (o === s) { if ("throw" === i) throw a; return { value: t, done: !0 }; } for (n.method = i, n.arg = a;;) { var c = n.delegate; if (c) { var u = maybeInvokeDelegate(c, n); if (u) { if (u === y) continue; return u; } } if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) { if (o === h) throw o = s, n.arg; n.dispatchException(n.arg); } else "return" === n.method && n.abrupt("return", n.arg); o = f; var p = tryCatch(e, r, n); if ("normal" === p.type) { if (o = n.done ? s : l, p.arg === y) continue; return { value: p.arg, done: n.done }; } "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg); } }; } function maybeInvokeDelegate(e, r) { var n = r.method, o = e.iterator[n]; if (o === t) return r.delegate = null, "throw" === n && e.iterator["return"] && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y; var i = tryCatch(o, e.iterator, r.arg); if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y; var a = i.arg; return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y); } function pushTryEntry(t) { var e = { tryLoc: t[0] }; 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e); } function resetTryEntry(t) { var e = t.completion || {}; e.type = "normal", delete e.arg, t.completion = e; } function Context(t) { this.tryEntries = [{ tryLoc: "root" }], t.forEach(pushTryEntry, this), this.reset(!0); } function values(e) { if (e || "" === e) { var r = e[a]; if (r) return r.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) { var o = -1, i = function next() { for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next; return next.value = t, next.done = !0, next; }; return i.next = i; } } throw new TypeError(_typeof(e) + " is not iterable"); } return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), o(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) { var e = "function" == typeof t && t.constructor; return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name)); }, e.mark = function (t) { return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t; }, e.awrap = function (t) { return { __await: t }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () { return this; }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) { void 0 === i && (i = Promise); var a = new AsyncIterator(wrap(t, r, n, o), i); return e.isGeneratorFunction(r) ? a : a.next().then(function (t) { return t.done ? t.value : a.next(); }); }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () { return this; }), define(g, "toString", function () { return "[object Generator]"; }), e.keys = function (t) { var e = Object(t), r = []; for (var n in e) r.push(n); return r.reverse(), function next() { for (; r.length;) { var t = r.pop(); if (t in e) return next.value = t, next.done = !1, next; } return next.done = !0, next; }; }, e.values = values, Context.prototype = { constructor: Context, reset: function reset(e) { if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t); }, stop: function stop() { this.done = !0; var t = this.tryEntries[0].completion; if ("throw" === t.type) throw t.arg; return this.rval; }, dispatchException: function dispatchException(e) { if (this.done) throw e; var r = this; function handle(n, o) { return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o; } for (var o = this.tryEntries.length - 1; o >= 0; --o) { var i = this.tryEntries[o], a = i.completion; if ("root" === i.tryLoc) return handle("end"); if (i.tryLoc <= this.prev) { var c = n.call(i, "catchLoc"), u = n.call(i, "finallyLoc"); if (c && u) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } else if (c) { if (this.prev < i.catchLoc) return handle(i.catchLoc, !0); } else { if (!u) throw Error("try statement without catch or finally"); if (this.prev < i.finallyLoc) return handle(i.finallyLoc); } } } }, abrupt: function abrupt(t, e) { for (var r = this.tryEntries.length - 1; r >= 0; --r) { var o = this.tryEntries[r]; if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) { var i = o; break; } } i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null); var a = i ? i.completion : {}; return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a); }, complete: function complete(t, e) { if ("throw" === t.type) throw t.arg; return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y; }, finish: function finish(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y; } }, "catch": function _catch(t) { for (var e = this.tryEntries.length - 1; e >= 0; --e) { var r = this.tryEntries[e]; if (r.tryLoc === t) { var n = r.completion; if ("throw" === n.type) { var o = n.arg; resetTryEntry(r); } return o; } } throw Error("illegal catch attempt"); }, delegateYield: function delegateYield(e, r, n) { return this.delegate = { iterator: values(e), resultName: r, nextLoc: n }, "next" === this.method && (this.arg = t), y; } }, e; }
|
|
1365
1447
|
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
@@ -1421,7 +1503,7 @@ var verifyToken = /*#__PURE__*/function () {
|
|
|
1421
1503
|
}();
|
|
1422
1504
|
|
|
1423
1505
|
/***/ }),
|
|
1424
|
-
/*
|
|
1506
|
+
/* 19 */
|
|
1425
1507
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1426
1508
|
|
|
1427
1509
|
"use strict";
|
|
@@ -1480,13 +1562,13 @@ var AuthError = /*#__PURE__*/function (_Error2) {
|
|
|
1480
1562
|
}( /*#__PURE__*/_wrapNativeSuper(Error));
|
|
1481
1563
|
|
|
1482
1564
|
/***/ }),
|
|
1483
|
-
/*
|
|
1565
|
+
/* 20 */
|
|
1484
1566
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1485
1567
|
|
|
1486
1568
|
"use strict";
|
|
1487
1569
|
__webpack_require__.r(__webpack_exports__);
|
|
1488
1570
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "createPkceMeta", function() { return createPkceMeta; });
|
|
1489
|
-
/* harmony import */ var _errors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
1571
|
+
/* harmony import */ var _errors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19);
|
|
1490
1572
|
/*!
|
|
1491
1573
|
* Copyright 2024-Present Animoca Brands Corporation Ltd.
|
|
1492
1574
|
*
|
|
@@ -1514,7 +1596,7 @@ var createPkceMeta = function createPkceMeta(signinParams) {
|
|
|
1514
1596
|
};
|
|
1515
1597
|
|
|
1516
1598
|
/***/ }),
|
|
1517
|
-
/*
|
|
1599
|
+
/* 21 */
|
|
1518
1600
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1519
1601
|
|
|
1520
1602
|
"use strict";
|
|
@@ -1540,7 +1622,7 @@ var parseJwt = function parseJwt(token) {
|
|
|
1540
1622
|
};
|
|
1541
1623
|
|
|
1542
1624
|
/***/ }),
|
|
1543
|
-
/*
|
|
1625
|
+
/* 22 */
|
|
1544
1626
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1545
1627
|
|
|
1546
1628
|
"use strict";
|
|
@@ -1604,7 +1686,7 @@ var TransactionManager = /*#__PURE__*/function () {
|
|
|
1604
1686
|
/* harmony default export */ __webpack_exports__["default"] = (TransactionManager);
|
|
1605
1687
|
|
|
1606
1688
|
/***/ }),
|
|
1607
|
-
/*
|
|
1689
|
+
/* 23 */
|
|
1608
1690
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1609
1691
|
|
|
1610
1692
|
"use strict";
|
|
@@ -1612,8 +1694,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1612
1694
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "BaseStorageManager", function() { return BaseStorageManager; });
|
|
1613
1695
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "LocalStorageManager", function() { return LocalStorageManager; });
|
|
1614
1696
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "getStorageClass", function() { return getStorageClass; });
|
|
1615
|
-
/* harmony import */ var _utils_errors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
1616
|
-
/* harmony import */ var _CookieStorageProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
1697
|
+
/* harmony import */ var _utils_errors__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(19);
|
|
1698
|
+
/* harmony import */ var _CookieStorageProvider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(24);
|
|
1617
1699
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
1618
1700
|
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
1619
1701
|
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
@@ -1734,7 +1816,7 @@ var getStorageClass = function getStorageClass(opts) {
|
|
|
1734
1816
|
return /*#__PURE__*/function (_BaseStorageManager3) {
|
|
1735
1817
|
function CookieStorageManager(storageName) {
|
|
1736
1818
|
_classCallCheck(this, CookieStorageManager);
|
|
1737
|
-
return _callSuper(this, CookieStorageManager, [storageName, new _CookieStorageProvider__WEBPACK_IMPORTED_MODULE_1__["CookieStorageProvider"](opts
|
|
1819
|
+
return _callSuper(this, CookieStorageManager, [storageName, new _CookieStorageProvider__WEBPACK_IMPORTED_MODULE_1__["CookieStorageProvider"](opts)]);
|
|
1738
1820
|
}
|
|
1739
1821
|
_inherits(CookieStorageManager, _BaseStorageManager3);
|
|
1740
1822
|
return _createClass(CookieStorageManager);
|
|
@@ -1745,13 +1827,13 @@ var getStorageClass = function getStorageClass(opts) {
|
|
|
1745
1827
|
};
|
|
1746
1828
|
|
|
1747
1829
|
/***/ }),
|
|
1748
|
-
/*
|
|
1830
|
+
/* 24 */
|
|
1749
1831
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1750
1832
|
|
|
1751
1833
|
"use strict";
|
|
1752
1834
|
__webpack_require__.r(__webpack_exports__);
|
|
1753
1835
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CookieStorageProvider", function() { return CookieStorageProvider; });
|
|
1754
|
-
/* harmony import */ var js_cookie__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
1836
|
+
/* harmony import */ var js_cookie__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25);
|
|
1755
1837
|
/* harmony import */ var js_cookie__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(js_cookie__WEBPACK_IMPORTED_MODULE_0__);
|
|
1756
1838
|
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
1757
1839
|
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
@@ -1770,14 +1852,14 @@ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e
|
|
|
1770
1852
|
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
1771
1853
|
*/
|
|
1772
1854
|
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
// Wrapper to support Cookie based storage
|
|
1776
1855
|
var CookieStorageProvider = /*#__PURE__*/function () {
|
|
1777
|
-
function CookieStorageProvider(
|
|
1856
|
+
function CookieStorageProvider() {
|
|
1857
|
+
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
1778
1858
|
_classCallCheck(this, CookieStorageProvider);
|
|
1779
1859
|
_defineProperty(this, "domain", void 0);
|
|
1780
|
-
this
|
|
1860
|
+
_defineProperty(this, "sameSite", void 0);
|
|
1861
|
+
this.domain = options.domain;
|
|
1862
|
+
this.sameSite = options.sameSite;
|
|
1781
1863
|
}
|
|
1782
1864
|
return _createClass(CookieStorageProvider, [{
|
|
1783
1865
|
key: "getItem",
|
|
@@ -1787,11 +1869,20 @@ var CookieStorageProvider = /*#__PURE__*/function () {
|
|
|
1787
1869
|
}, {
|
|
1788
1870
|
key: "setItem",
|
|
1789
1871
|
value: function setItem(key, value) {
|
|
1790
|
-
|
|
1872
|
+
var cookieOptions = {
|
|
1791
1873
|
expires: 365,
|
|
1792
1874
|
path: '/',
|
|
1793
1875
|
domain: this.domain
|
|
1794
|
-
}
|
|
1876
|
+
};
|
|
1877
|
+
if (this.sameSite === true) {
|
|
1878
|
+
cookieOptions.sameSite = 'Strict';
|
|
1879
|
+
} else if (this.sameSite === false) {
|
|
1880
|
+
cookieOptions.sameSite = 'None';
|
|
1881
|
+
cookieOptions.secure = true;
|
|
1882
|
+
}
|
|
1883
|
+
|
|
1884
|
+
// if sameSite is undefined or null, leave default browser behavior
|
|
1885
|
+
return js_cookie__WEBPACK_IMPORTED_MODULE_0___default.a.set(key, value, cookieOptions);
|
|
1795
1886
|
}
|
|
1796
1887
|
}, {
|
|
1797
1888
|
key: "removeItem",
|
|
@@ -1805,7 +1896,7 @@ var CookieStorageProvider = /*#__PURE__*/function () {
|
|
|
1805
1896
|
}();
|
|
1806
1897
|
|
|
1807
1898
|
/***/ }),
|
|
1808
|
-
/*
|
|
1899
|
+
/* 25 */
|
|
1809
1900
|
/***/ (function(module, exports, __webpack_require__) {
|
|
1810
1901
|
|
|
1811
1902
|
/*! js-cookie v3.0.5 | MIT */
|
|
@@ -1953,12 +2044,12 @@ var CookieStorageProvider = /*#__PURE__*/function () {
|
|
|
1953
2044
|
|
|
1954
2045
|
|
|
1955
2046
|
/***/ }),
|
|
1956
|
-
/*
|
|
2047
|
+
/* 26 */
|
|
1957
2048
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1958
2049
|
|
|
1959
2050
|
"use strict";
|
|
1960
2051
|
__webpack_require__.r(__webpack_exports__);
|
|
1961
|
-
/* harmony import */ var _buildAuthEndpointUrl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
2052
|
+
/* harmony import */ var _buildAuthEndpointUrl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(27);
|
|
1962
2053
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "buildAuthEndpointUrl", function() { return _buildAuthEndpointUrl__WEBPACK_IMPORTED_MODULE_0__["buildAuthEndpointUrl"]; });
|
|
1963
2054
|
|
|
1964
2055
|
/*!
|
|
@@ -1973,7 +2064,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1973
2064
|
|
|
1974
2065
|
|
|
1975
2066
|
/***/ }),
|
|
1976
|
-
/*
|
|
2067
|
+
/* 27 */
|
|
1977
2068
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
1978
2069
|
|
|
1979
2070
|
"use strict";
|
|
@@ -2012,12 +2103,12 @@ var buildAuthEndpointUrl = function buildAuthEndpointUrl(signInParams, loginEndP
|
|
|
2012
2103
|
};
|
|
2013
2104
|
|
|
2014
2105
|
/***/ }),
|
|
2015
|
-
/*
|
|
2106
|
+
/* 28 */
|
|
2016
2107
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2017
2108
|
|
|
2018
2109
|
"use strict";
|
|
2019
2110
|
__webpack_require__.r(__webpack_exports__);
|
|
2020
|
-
/* harmony import */ var _lib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
2111
|
+
/* harmony import */ var _lib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(29);
|
|
2021
2112
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TokenManager", function() { return _lib__WEBPACK_IMPORTED_MODULE_0__["TokenManager"]; });
|
|
2022
2113
|
|
|
2023
2114
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TransactionManager", function() { return _lib__WEBPACK_IMPORTED_MODULE_0__["TransactionManager"]; });
|
|
@@ -2039,18 +2130,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2039
2130
|
|
|
2040
2131
|
|
|
2041
2132
|
/***/ }),
|
|
2042
|
-
/*
|
|
2133
|
+
/* 29 */
|
|
2043
2134
|
/***/ (function(module, __webpack_exports__, __webpack_require__) {
|
|
2044
2135
|
|
|
2045
2136
|
"use strict";
|
|
2046
2137
|
__webpack_require__.r(__webpack_exports__);
|
|
2047
|
-
/* harmony import */ var _TokenManager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(
|
|
2138
|
+
/* harmony import */ var _TokenManager__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(10);
|
|
2048
2139
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TokenManager", function() { return _TokenManager__WEBPACK_IMPORTED_MODULE_0__["default"]; });
|
|
2049
2140
|
|
|
2050
|
-
/* harmony import */ var _TransactionManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
2141
|
+
/* harmony import */ var _TransactionManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(22);
|
|
2051
2142
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "TransactionManager", function() { return _TransactionManager__WEBPACK_IMPORTED_MODULE_1__["default"]; });
|
|
2052
2143
|
|
|
2053
|
-
/* harmony import */ var _StorageManager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(
|
|
2144
|
+
/* harmony import */ var _StorageManager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(23);
|
|
2054
2145
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "BaseStorageManager", function() { return _StorageManager__WEBPACK_IMPORTED_MODULE_2__["BaseStorageManager"]; });
|
|
2055
2146
|
|
|
2056
2147
|
/* harmony reexport (safe) */ __webpack_require__.d(__webpack_exports__, "LocalStorageManager", function() { return _StorageManager__WEBPACK_IMPORTED_MODULE_2__["LocalStorageManager"]; });
|