@nsshunt/stsoauth2plugin 1.0.18 → 1.0.20
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/dist/stsoauth2plugin.mjs
CHANGED
|
@@ -45,6 +45,9 @@ import { Gauge } from "@nsshunt/stsinstrumentation";
|
|
|
45
45
|
const STSOAuth2ManagerPluginKey = Symbol();
|
|
46
46
|
const isNode = Object.prototype.toString.call(typeof process !== "undefined" ? process : 0) === "[object process]";
|
|
47
47
|
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
48
|
+
function getDefaultExportFromCjs(x) {
|
|
49
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
50
|
+
}
|
|
48
51
|
function getAugmentedNamespace(n2) {
|
|
49
52
|
if (n2.__esModule)
|
|
50
53
|
return n2;
|
|
@@ -74,27 +77,11 @@ function getAugmentedNamespace(n2) {
|
|
|
74
77
|
});
|
|
75
78
|
return a;
|
|
76
79
|
}
|
|
77
|
-
var
|
|
78
|
-
var sha256 = {
|
|
79
|
-
get exports() {
|
|
80
|
-
return sha256Exports;
|
|
81
|
-
},
|
|
82
|
-
set exports(v) {
|
|
83
|
-
sha256Exports = v;
|
|
84
|
-
}
|
|
85
|
-
};
|
|
80
|
+
var sha256$1 = { exports: {} };
|
|
86
81
|
function commonjsRequire(path) {
|
|
87
82
|
throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
88
83
|
}
|
|
89
|
-
var
|
|
90
|
-
var core = {
|
|
91
|
-
get exports() {
|
|
92
|
-
return coreExports;
|
|
93
|
-
},
|
|
94
|
-
set exports(v) {
|
|
95
|
-
coreExports = v;
|
|
96
|
-
}
|
|
97
|
-
};
|
|
84
|
+
var core = { exports: {} };
|
|
98
85
|
const __viteBrowserExternal = {};
|
|
99
86
|
const __viteBrowserExternal$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
100
87
|
__proto__: null,
|
|
@@ -104,7 +91,7 @@ const require$$0 = /* @__PURE__ */ getAugmentedNamespace(__viteBrowserExternal$1
|
|
|
104
91
|
var hasRequiredCore;
|
|
105
92
|
function requireCore() {
|
|
106
93
|
if (hasRequiredCore)
|
|
107
|
-
return
|
|
94
|
+
return core.exports;
|
|
108
95
|
hasRequiredCore = 1;
|
|
109
96
|
(function(module, exports) {
|
|
110
97
|
(function(root, factory) {
|
|
@@ -706,7 +693,7 @@ function requireCore() {
|
|
|
706
693
|
return CryptoJS;
|
|
707
694
|
});
|
|
708
695
|
})(core);
|
|
709
|
-
return
|
|
696
|
+
return core.exports;
|
|
710
697
|
}
|
|
711
698
|
(function(module, exports) {
|
|
712
699
|
(function(root, factory) {
|
|
@@ -820,16 +807,10 @@ function requireCore() {
|
|
|
820
807
|
})(Math);
|
|
821
808
|
return CryptoJS.SHA256;
|
|
822
809
|
});
|
|
823
|
-
})(sha256);
|
|
824
|
-
var
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
return encBase64Exports;
|
|
828
|
-
},
|
|
829
|
-
set exports(v) {
|
|
830
|
-
encBase64Exports = v;
|
|
831
|
-
}
|
|
832
|
-
};
|
|
810
|
+
})(sha256$1);
|
|
811
|
+
var sha256Exports = sha256$1.exports;
|
|
812
|
+
const sha256 = /* @__PURE__ */ getDefaultExportFromCjs(sha256Exports);
|
|
813
|
+
var encBase64 = { exports: {} };
|
|
833
814
|
(function(module, exports) {
|
|
834
815
|
(function(root, factory) {
|
|
835
816
|
{
|
|
@@ -930,12 +911,14 @@ var encBase64 = {
|
|
|
930
911
|
return CryptoJS.enc.Base64;
|
|
931
912
|
});
|
|
932
913
|
})(encBase64);
|
|
914
|
+
var encBase64Exports = encBase64.exports;
|
|
915
|
+
const Base64 = /* @__PURE__ */ getDefaultExportFromCjs(encBase64Exports);
|
|
933
916
|
class CryptoUtils {
|
|
934
917
|
constructor() {
|
|
935
918
|
__privateAdd(this, _crypto, void 0);
|
|
936
919
|
__publicField(this, "DigestMessage", async function(message) {
|
|
937
|
-
const hashDigest =
|
|
938
|
-
return
|
|
920
|
+
const hashDigest = sha256(message);
|
|
921
|
+
return Base64.stringify(hashDigest);
|
|
939
922
|
});
|
|
940
923
|
__publicField(this, "CreateRandomString", (size = 43) => {
|
|
941
924
|
const randomValues = Array.from(__privateGet(this, _crypto).getRandomValues(new Uint8Array(size)));
|