@burdenoff/fe-libs 2026.601.3 → 2026.601.5
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/shared/components/SSORedirectGuard.d.ts.map +1 -1
- package/dist/shared/components/SSORedirectGuard.js +45 -45
- package/dist/shared/config/authBridgeUrls.d.ts.map +1 -1
- package/dist/shared/config/authBridgeUrls.js +13 -3
- package/dist/shared/providers/shell/MultiGatewayProvider.d.ts.map +1 -1
- package/dist/shared/providers/shell/authProvider/ssoRelay.d.ts.map +1 -1
- package/dist/shared/providers/shell/authProvider/ssoRelay.js +13 -13
- package/dist/shared/utils/authCookie.d.ts +1 -0
- package/dist/shared/utils/authCookie.d.ts.map +1 -1
- package/dist/shared/utils/authCookie.js +14 -11
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SSORedirectGuard.d.ts","sourceRoot":"","sources":["../../../src/shared/components/SSORedirectGuard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;
|
|
1
|
+
{"version":3,"file":"SSORedirectGuard.d.ts","sourceRoot":"","sources":["../../../src/shared/components/SSORedirectGuard.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAsGH,wBAAgB,qBAAqB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAGlE;AAED,wBAAgB,2BAA2B,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAM1F;AAED,wBAAgB,sBAAsB,CAAC,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAiBlF;AAmDD,wBAAgB,iBAAiB,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CA4CpE;AAED;;;;;;;;;GASG;AACH,wBAAgB,QAAQ,IAAI,OAAO,CA6BlC;AAED;;;;;;;;;GASG;AACH,wBAAsB,cAAc,CAAC,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAyC9F;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CA6B1C;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,4CAMjC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { resolveAuthBridgeConfig as e } from "../config/authBridgeUrls.js";
|
|
2
2
|
import { clearActiveContextStorage as t } from "../providers/shell/ActiveContextStorage.js";
|
|
3
|
-
import { clearShellSsoCookies as n,
|
|
4
|
-
import { jsx as
|
|
3
|
+
import { clearShellSsoCookies as n, isLocalDevSsoHost as r, isSharedSsoCookieDomain as i, isTrustedSsoOrigin as a, readShellSsoCookie as o } from "../utils/authCookie.js";
|
|
4
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
5
5
|
//#region src/shared/components/SSORedirectGuard.tsx
|
|
6
|
-
var
|
|
6
|
+
var c = "bf-sso-relay-attempt", l = 120 * 1e3, u = [
|
|
7
7
|
"sso_failed",
|
|
8
8
|
"sso-failed",
|
|
9
9
|
"sso-attempted"
|
|
10
10
|
];
|
|
11
|
-
function
|
|
11
|
+
function d(e) {
|
|
12
12
|
if (typeof window > "u") return null;
|
|
13
13
|
try {
|
|
14
14
|
let t = `${window.location.pathname}${window.location.search}${window.location.hash}`, n = new URL(e ?? t, window.location.origin);
|
|
@@ -17,66 +17,66 @@ function u(e) {
|
|
|
17
17
|
return null;
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
-
function d(e) {
|
|
21
|
-
return e === "/auth" || e.startsWith("/auth/");
|
|
22
|
-
}
|
|
23
20
|
function f(e) {
|
|
24
|
-
return
|
|
21
|
+
return e === "/auth" || e.startsWith("/auth/");
|
|
25
22
|
}
|
|
26
23
|
function p(e) {
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
return u.some((t) => e.searchParams.has(t));
|
|
25
|
+
}
|
|
26
|
+
function m(e) {
|
|
27
|
+
if (p(e)) return n(), !0;
|
|
28
|
+
if (f(e.pathname)) return !0;
|
|
29
29
|
let t = e.searchParams.get("reason");
|
|
30
30
|
return t === "session-expired" || t === "logout";
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function h() {
|
|
33
33
|
try {
|
|
34
|
-
sessionStorage.removeItem(
|
|
34
|
+
sessionStorage.removeItem(c);
|
|
35
35
|
} catch {}
|
|
36
36
|
}
|
|
37
|
-
function
|
|
37
|
+
function g() {
|
|
38
38
|
if (typeof window > "u") return null;
|
|
39
39
|
try {
|
|
40
|
-
let e = sessionStorage.getItem(
|
|
40
|
+
let e = sessionStorage.getItem(c);
|
|
41
41
|
if (!e) return null;
|
|
42
42
|
let t = JSON.parse(e);
|
|
43
|
-
return typeof t.relayOrigin != "string" || typeof t.returnTo != "string" || typeof t.startedAt != "number" || Date.now() - t.startedAt >
|
|
43
|
+
return typeof t.relayOrigin != "string" || typeof t.returnTo != "string" || typeof t.startedAt != "number" || Date.now() - t.startedAt > l ? (h(), null) : {
|
|
44
44
|
relayOrigin: t.relayOrigin,
|
|
45
45
|
returnTo: t.returnTo,
|
|
46
46
|
startedAt: t.startedAt
|
|
47
47
|
};
|
|
48
48
|
} catch {
|
|
49
|
-
return
|
|
49
|
+
return h(), null;
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
|
-
function
|
|
52
|
+
function _(e) {
|
|
53
53
|
try {
|
|
54
54
|
return new URL(e).origin;
|
|
55
55
|
} catch {
|
|
56
56
|
return null;
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
function
|
|
60
|
-
let t =
|
|
61
|
-
return !t ||
|
|
59
|
+
function v(e) {
|
|
60
|
+
let t = d(e);
|
|
61
|
+
return !t || m(t);
|
|
62
62
|
}
|
|
63
|
-
function
|
|
64
|
-
let n =
|
|
63
|
+
function y(e, t) {
|
|
64
|
+
let n = _(e), r = d(t), i = g();
|
|
65
65
|
return !!(n && r && i?.returnTo === r.href);
|
|
66
66
|
}
|
|
67
|
-
function
|
|
67
|
+
function b(e, t) {
|
|
68
68
|
if (typeof window > "u") return;
|
|
69
|
-
let n =
|
|
69
|
+
let n = _(e), r = d(t);
|
|
70
70
|
if (!(!n || !r)) try {
|
|
71
71
|
let e = {
|
|
72
72
|
relayOrigin: n,
|
|
73
73
|
returnTo: r.href,
|
|
74
74
|
startedAt: Date.now()
|
|
75
75
|
};
|
|
76
|
-
sessionStorage.setItem(
|
|
76
|
+
sessionStorage.setItem(c, JSON.stringify(e));
|
|
77
77
|
} catch {}
|
|
78
78
|
}
|
|
79
|
-
function
|
|
79
|
+
function x() {
|
|
80
80
|
if (typeof window > "u") return !1;
|
|
81
81
|
try {
|
|
82
82
|
let e = window.Capacitor;
|
|
@@ -84,35 +84,35 @@ function b() {
|
|
|
84
84
|
} catch {}
|
|
85
85
|
return !!(typeof navigator < "u" && /Electron/i.test(navigator.userAgent || ""));
|
|
86
86
|
}
|
|
87
|
-
function
|
|
88
|
-
if (
|
|
87
|
+
function S(t) {
|
|
88
|
+
if (x()) return null;
|
|
89
89
|
try {
|
|
90
|
-
let n =
|
|
91
|
-
if (!n ||
|
|
92
|
-
let
|
|
93
|
-
if (
|
|
94
|
-
let e = new URL(
|
|
95
|
-
if (e && e !==
|
|
90
|
+
let n = d(t);
|
|
91
|
+
if (!n || m(n) || r()) return null;
|
|
92
|
+
let i = window.location.origin, s = o();
|
|
93
|
+
if (s?.origin && a(s.origin)) {
|
|
94
|
+
let e = new URL(s.origin).origin;
|
|
95
|
+
if (e && e !== i && !y(e, n.href)) return b(e, n.href), `${e}/auth/sso-relay?returnTo=${encodeURIComponent(n.href)}`;
|
|
96
96
|
}
|
|
97
97
|
try {
|
|
98
|
-
let t = e(),
|
|
99
|
-
if (
|
|
98
|
+
let t = e(), r = new URL(t.url).origin;
|
|
99
|
+
if (r && r !== i && !y(r, n.href)) return b(r, n.href), `${r}/auth/sso-relay?returnTo=${encodeURIComponent(n.href)}`;
|
|
100
100
|
} catch {}
|
|
101
101
|
return null;
|
|
102
102
|
} catch {
|
|
103
103
|
return null;
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
-
function
|
|
106
|
+
function C() {
|
|
107
107
|
try {
|
|
108
|
-
if (
|
|
108
|
+
if (o()) return !1;
|
|
109
109
|
let e = sessionStorage.getItem("bf-active-profile");
|
|
110
|
-
return !e || !localStorage.getItem(`bf-p-${e}-tokens`) || !
|
|
110
|
+
return !e || !localStorage.getItem(`bf-p-${e}-tokens`) || !i() ? !1 : (T(), !0);
|
|
111
111
|
} catch {
|
|
112
112
|
return !1;
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
|
-
async function
|
|
115
|
+
async function w(e, t) {
|
|
116
116
|
try {
|
|
117
117
|
let n = await fetch(e, {
|
|
118
118
|
method: "POST",
|
|
@@ -129,7 +129,7 @@ async function C(e, t) {
|
|
|
129
129
|
return !1;
|
|
130
130
|
}
|
|
131
131
|
}
|
|
132
|
-
function
|
|
132
|
+
function T() {
|
|
133
133
|
try {
|
|
134
134
|
let e = localStorage.getItem("bf-profiles");
|
|
135
135
|
if (e) {
|
|
@@ -140,11 +140,11 @@ function w() {
|
|
|
140
140
|
localStorage.removeItem("bf-profiles"), localStorage.removeItem("auth-storage"), sessionStorage.removeItem("bf-active-profile"), t(), n(), window.dispatchEvent(new Event("bf-auth-state-cleared")), window.dispatchEvent(new Event("bf-profile-storage-change"));
|
|
141
141
|
} catch {}
|
|
142
142
|
}
|
|
143
|
-
function
|
|
144
|
-
return /* @__PURE__ */
|
|
143
|
+
function E() {
|
|
144
|
+
return /* @__PURE__ */ s("div", {
|
|
145
145
|
className: "flex items-center justify-center min-h-screen",
|
|
146
|
-
children: /* @__PURE__ */
|
|
146
|
+
children: /* @__PURE__ */ s("div", { className: "animate-spin rounded-full size-8 border-2 border-action-primary-bg border-t-transparent" })
|
|
147
147
|
});
|
|
148
148
|
}
|
|
149
149
|
//#endregion
|
|
150
|
-
export {
|
|
150
|
+
export { E as SSORedirectSpinner, w as checkRemoteSLO, C as checkSLO, T as clearLocalAuthState, S as getSSORedirectUrl, y as hasRecentSSORedirectAttempt, b as markSSORedirectAttempt, v as shouldSkipSSORedirect };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authBridgeUrls.d.ts","sourceRoot":"","sources":["../../../src/shared/config/authBridgeUrls.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,MAAM,WAAW,uBAAuB;IACtC,GAAG,EAAE,MAAM,CAAC;IACZ,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,OAAO,CAAC;CAChB;
|
|
1
|
+
{"version":3,"file":"authBridgeUrls.d.ts","sourceRoot":"","sources":["../../../src/shared/config/authBridgeUrls.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAIH,MAAM,WAAW,uBAAuB;IACtC,GAAG,EAAE,MAAM,CAAC;IACZ,cAAc,EAAE,MAAM,CAAC;IACvB,KAAK,EAAE,OAAO,CAAC;CAChB;AAyCD;;;;;;;GAOG;AACH,wBAAgB,uBAAuB,IAAI,uBAAuB,CAcjE"}
|
|
@@ -13,9 +13,19 @@ var i = {
|
|
|
13
13
|
allowedOrigins: "*",
|
|
14
14
|
debug: !0
|
|
15
15
|
};
|
|
16
|
-
function s() {
|
|
16
|
+
function s(e) {
|
|
17
|
+
return e ? e === "localhost" || e === "127.0.0.1" || e === "0.0.0.0" || e === "[::1]" || e === "::1" || e.endsWith(".localhost") : !1;
|
|
18
|
+
}
|
|
19
|
+
function c() {
|
|
20
|
+
return {
|
|
21
|
+
url: `${typeof window > "u" ? "" : window.location.origin}/auth/session-bridge`,
|
|
22
|
+
allowedOrigins: "*",
|
|
23
|
+
debug: !0
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
function l() {
|
|
17
27
|
let e = r();
|
|
18
|
-
return n.has(e) ? i : t.has(e) ? a : o;
|
|
28
|
+
return n.has(e) ? i : t.has(e) ? a : s(e) ? c() : o;
|
|
19
29
|
}
|
|
20
30
|
//#endregion
|
|
21
|
-
export {
|
|
31
|
+
export { l as resolveAuthBridgeConfig };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiGatewayProvider.d.ts","sourceRoot":"","sources":["../../../../src/shared/providers/shell/MultiGatewayProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAA2C,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIhF,OAAO,EAAuB,KAAK,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAKzE,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,SAAS,CAAC;IACpB,qCAAqC;IACrC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kCAAkC;IAClC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kEAAkE;IAClE,cAAc,CAAC,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;IACrC,qEAAqE;IACrE,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,2BAA2B;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,2BAA2B;IAC3B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,gDAAgD;IAChD,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,yCAAyC;IACzC,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACxC,+CAA+C;IAC/C,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;CACzC;AAED,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,cAA4B,EAC5B,KAAa,EACb,mBAA2B,EAC3B,WAAW,EACX,cAAc,EACd,cAAc,GACf,EAAE,yBAAyB,
|
|
1
|
+
{"version":3,"file":"MultiGatewayProvider.d.ts","sourceRoot":"","sources":["../../../../src/shared/providers/shell/MultiGatewayProvider.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAA2C,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAIhF,OAAO,EAAuB,KAAK,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAKzE,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,SAAS,CAAC;IACpB,qCAAqC;IACrC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,kCAAkC;IAClC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kEAAkE;IAClE,cAAc,CAAC,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;IACrC,qEAAqE;IACrE,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,2BAA2B;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,2BAA2B;IAC3B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,gDAAgD;IAChD,WAAW,CAAC,EAAE,MAAM,IAAI,CAAC;IACzB,yCAAyC;IACzC,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACxC,+CAA+C;IAC/C,cAAc,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;CACzC;AAED,wBAAgB,oBAAoB,CAAC,EACnC,QAAQ,EACR,gBAAgB,EAChB,aAAa,EACb,cAAc,EACd,cAA4B,EAC5B,KAAa,EACb,mBAA2B,EAC3B,WAAW,EACX,cAAc,EACd,cAAc,GACf,EAAE,yBAAyB,2CAoR3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ssoRelay.d.ts","sourceRoot":"","sources":["../../../../../src/shared/providers/shell/authProvider/ssoRelay.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ssoRelay.d.ts","sourceRoot":"","sources":["../../../../../src/shared/providers/shell/authProvider/ssoRelay.ts"],"names":[],"mappings":"AAYA;;;;;;;;;;;;GAYG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,GAAG,IAAI,CAWvD;AAED,wBAAgB,sBAAsB,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAWxE;AAED,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CA0BrE"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { resolveAuthBridgeConfig as e } from "../../../config/authBridgeUrls.js";
|
|
2
|
-
import {
|
|
3
|
-
import { hasRecentSSORedirectAttempt as
|
|
2
|
+
import { isLocalDevSsoHost as t, isTrustedSsoOrigin as n, readShellSsoCookie as r } from "../../../utils/authCookie.js";
|
|
3
|
+
import { hasRecentSSORedirectAttempt as i, markSSORedirectAttempt as a, shouldSkipSSORedirect as o } from "../../../components/SSORedirectGuard.js";
|
|
4
4
|
//#region src/shared/providers/shell/authProvider/ssoRelay.ts
|
|
5
|
-
function
|
|
5
|
+
function s() {
|
|
6
6
|
if (typeof window > "u") return null;
|
|
7
7
|
try {
|
|
8
8
|
let t = e(), n = new URL(t.url).origin;
|
|
@@ -13,7 +13,7 @@ function o() {
|
|
|
13
13
|
return null;
|
|
14
14
|
}
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function c(e) {
|
|
17
17
|
if (!e) return !1;
|
|
18
18
|
try {
|
|
19
19
|
return !!(localStorage.getItem(`bf-p-${e}-tokens`) && localStorage.getItem(`bf-p-${e}-user`));
|
|
@@ -21,18 +21,18 @@ function s(e) {
|
|
|
21
21
|
return !1;
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function l(e) {
|
|
25
25
|
try {
|
|
26
|
-
if (
|
|
27
|
-
let
|
|
28
|
-
if (!
|
|
29
|
-
let
|
|
30
|
-
if (
|
|
31
|
-
let
|
|
32
|
-
return
|
|
26
|
+
if (o() || t()) return null;
|
|
27
|
+
let s = r();
|
|
28
|
+
if (!s?.origin || !n(s.origin)) return null;
|
|
29
|
+
let l = new URL(s.origin).origin, u = new URL(e).origin;
|
|
30
|
+
if (l === window.location.origin || l === u || c(s.id)) return null;
|
|
31
|
+
let d = window.location.href;
|
|
32
|
+
return i(l, d) ? null : (a(l, d), `${l}/auth/sso-relay?returnTo=${encodeURIComponent(d)}`);
|
|
33
33
|
} catch {
|
|
34
34
|
return null;
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
37
|
//#endregion
|
|
38
|
-
export {
|
|
38
|
+
export { l as getCookieSsoRelayUrl, s as getCrossOriginLogoutUrl };
|
|
@@ -13,6 +13,7 @@ export interface ShellSsoCookieData {
|
|
|
13
13
|
origin: string | null;
|
|
14
14
|
}
|
|
15
15
|
export declare function isSharedSsoCookieDomain(): boolean;
|
|
16
|
+
export declare function isLocalDevSsoHost(hostname?: string): boolean;
|
|
16
17
|
export declare function isTrustedSsoOrigin(origin: string | null | undefined): boolean;
|
|
17
18
|
export declare function setShellSsoCookies(profileId: string, origin?: string): void;
|
|
18
19
|
export declare function readShellSsoCookie(): ShellSsoCookieData | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authCookie.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/authCookie.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAOH,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AA4DD,wBAAgB,uBAAuB,IAAI,OAAO,CAQjD;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CA4B7E;AAED,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,SAAyB,GAAG,IAAI,CAU3F;AAED,wBAAgB,kBAAkB,IAAI,kBAAkB,GAAG,IAAI,CAS9D;AAED,wBAAgB,oBAAoB,IAAI,IAAI,CAQ3C;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAEpD;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,MAAM,GAAG,IAAI,CAI5C;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAErC"}
|
|
1
|
+
{"version":3,"file":"authCookie.d.ts","sourceRoot":"","sources":["../../../src/shared/utils/authCookie.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAOH,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AA4DD,wBAAgB,uBAAuB,IAAI,OAAO,CAQjD;AAED,wBAAgB,iBAAiB,CAAC,QAAQ,SAA2B,GAAG,OAAO,CAU9E;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CA4B7E;AAED,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,SAAyB,GAAG,IAAI,CAU3F;AAED,wBAAgB,kBAAkB,IAAI,kBAAkB,GAAG,IAAI,CAS9D;AAED,wBAAgB,oBAAoB,IAAI,IAAI,CAQ3C;AAED;;;;GAIG;AACH,wBAAgB,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAEpD;AAED;;;GAGG;AACH,wBAAgB,YAAY,IAAI,MAAM,GAAG,IAAI,CAI5C;AAED;;GAEG;AACH,wBAAgB,cAAc,IAAI,IAAI,CAErC"}
|
|
@@ -37,7 +37,10 @@ function s() {
|
|
|
37
37
|
let e = window.location.hostname;
|
|
38
38
|
return e.endsWith(".local.burdenoff.com") || e === "localhost" || e === "127.0.0.1";
|
|
39
39
|
}
|
|
40
|
-
function c(
|
|
40
|
+
function c(e = window.location.hostname) {
|
|
41
|
+
return e === "localhost" || e === "127.0.0.1" || e === "0.0.0.0" || e === "[::1]" || e === "::1" || e.endsWith(".localhost") || e.endsWith(".local.burdenoff.com");
|
|
42
|
+
}
|
|
43
|
+
function l(t) {
|
|
41
44
|
if (!t) return !1;
|
|
42
45
|
try {
|
|
43
46
|
let n = new URL(t);
|
|
@@ -49,13 +52,13 @@ function c(t) {
|
|
|
49
52
|
return !1;
|
|
50
53
|
}
|
|
51
54
|
}
|
|
52
|
-
function
|
|
55
|
+
function u(e, n = window.location.origin) {
|
|
53
56
|
if (typeof document > "u") return;
|
|
54
|
-
|
|
57
|
+
f();
|
|
55
58
|
let i = a(), o = i ? `; domain=${i}` : "", s = window.location.protocol === "https:" ? "; secure" : "", c = r(e, n);
|
|
56
59
|
for (let e of t) document.cookie = `${e}=${c}${o}; path=/; samesite=lax${s}; max-age=86400`;
|
|
57
60
|
}
|
|
58
|
-
function
|
|
61
|
+
function d() {
|
|
59
62
|
if (typeof document > "u") return null;
|
|
60
63
|
for (let e of t) {
|
|
61
64
|
let t = document.cookie.match(RegExp(`(?:^|;\\s*)${e}=([^;]*)`));
|
|
@@ -65,22 +68,22 @@ function u() {
|
|
|
65
68
|
}
|
|
66
69
|
return null;
|
|
67
70
|
}
|
|
68
|
-
function
|
|
71
|
+
function f() {
|
|
69
72
|
if (!(typeof document > "u")) for (let e of t) {
|
|
70
73
|
document.cookie = `${e}=; path=/; max-age=0`;
|
|
71
74
|
for (let t of o()) document.cookie = `${e}=; path=/; domain=${t}; max-age=0`;
|
|
72
75
|
}
|
|
73
76
|
}
|
|
74
|
-
function
|
|
75
|
-
|
|
77
|
+
function p(e) {
|
|
78
|
+
u(e);
|
|
76
79
|
}
|
|
77
|
-
function
|
|
80
|
+
function m() {
|
|
78
81
|
if (typeof document > "u") return null;
|
|
79
82
|
let e = document.cookie.match(RegExp(`(?:^|;\\s*)${n}=([^;]*)`));
|
|
80
83
|
return e ? i(e[1])?.id ?? null : null;
|
|
81
84
|
}
|
|
82
|
-
function
|
|
83
|
-
|
|
85
|
+
function h() {
|
|
86
|
+
f();
|
|
84
87
|
}
|
|
85
88
|
//#endregion
|
|
86
|
-
export {
|
|
89
|
+
export { h as clearSSoCookie, f as clearShellSsoCookies, m as getSSoCookie, c as isLocalDevSsoHost, s as isSharedSsoCookieDomain, l as isTrustedSsoOrigin, d as readShellSsoCookie, p as setSSoCookie, u as setShellSsoCookies };
|