@burdenoff/microfe-auth 2026.520.1 → 2026.521.1
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/auth/AuthRoutes.js +8 -8
- package/dist/auth/AuthRoutes.js.map +1 -1
- package/dist/auth/components/AuthLayout.js +1 -1
- package/dist/auth/components/AuthLayout.js.map +1 -1
- package/dist/auth/hooks/useSessionOperations.d.ts.map +1 -1
- package/dist/auth/hooks/useSessionOperations.js +4 -1
- package/dist/auth/hooks/useSessionOperations.js.map +1 -1
- package/dist/auth/hooks/useUserOperations.d.ts.map +1 -1
- package/dist/auth/hooks/useUserOperations.js +26 -11
- package/dist/auth/hooks/useUserOperations.js.map +1 -1
- package/dist/auth/pages/AuditLogPage.d.ts.map +1 -1
- package/dist/auth/pages/AuditLogPage.js +49 -48
- package/dist/auth/pages/AuditLogPage.js.map +1 -1
- package/dist/auth/pages/LoginPage.d.ts.map +1 -1
- package/dist/auth/pages/LoginPage.js +3 -2
- package/dist/auth/pages/LoginPage.js.map +1 -1
- package/dist/auth/pages/PasswordResetPage.js +1 -1
- package/dist/auth/pages/PasswordResetPage.js.map +1 -1
- package/dist/auth/pages/ReactivatePage.js +1 -1
- package/dist/auth/pages/ReactivatePage.js.map +1 -1
- package/dist/auth/pages/RegisterPage.js +1 -1
- package/dist/auth/pages/RegisterPage.js.map +1 -1
- package/dist/auth/pages/SessionsPage.d.ts.map +1 -1
- package/dist/auth/pages/SessionsPage.js +26 -23
- package/dist/auth/pages/SessionsPage.js.map +1 -1
- package/dist/auth/pages/SsoCallbackPage.js +1 -1
- package/dist/auth/pages/SsoCallbackPage.js.map +1 -1
- package/dist/auth/pages/SsoConfigPage.d.ts.map +1 -1
- package/dist/auth/pages/SsoConfigPage.js +214 -190
- package/dist/auth/pages/SsoConfigPage.js.map +1 -1
- package/dist/auth/pages/SsoLoginPage.js +1 -1
- package/dist/auth/pages/SsoLoginPage.js.map +1 -1
- package/dist/auth/pages/UserProfilePage.d.ts.map +1 -1
- package/dist/auth/pages/UserProfilePage.js +254 -238
- package/dist/auth/pages/UserProfilePage.js.map +1 -1
- package/dist/auth/pages/UsersPage.d.ts.map +1 -1
- package/dist/auth/pages/UsersPage.js +0 -1
- package/dist/auth/pages/UsersPage.js.map +1 -1
- package/dist/auth/store/authStore.d.ts +20 -0
- package/dist/auth/store/authStore.d.ts.map +1 -1
- package/dist/auth/store/authStore.js.map +1 -1
- package/dist/microfe-auth.css +1 -1
- package/dist/translations/en.d.ts +12 -0
- package/dist/translations/en.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/auth/pages/AppsPage.d.ts +0 -5
- package/dist/auth/pages/AppsPage.d.ts.map +0 -1
|
@@ -8,11 +8,12 @@ import { useCallback as c, useEffect as l, useRef as u, useState as d } from "re
|
|
|
8
8
|
import { useNavigate as f } from "react-router-dom";
|
|
9
9
|
import { useI18n as p } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
10
10
|
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
11
|
+
import { useFeatureFlagDetails as _ } from "@burdenoff/fe-libs/shared/feature-flags";
|
|
11
12
|
//#region src/auth/pages/SsoConfigPage.tsx
|
|
12
|
-
var
|
|
13
|
+
var v = async (e) => {
|
|
13
14
|
o("light"), s(await a(e) ? "success" : "error");
|
|
14
15
|
};
|
|
15
|
-
function
|
|
16
|
+
function y(e) {
|
|
16
17
|
try {
|
|
17
18
|
let t = new DOMParser().parseFromString(e, "text/xml"), n = t.querySelector("parsererror");
|
|
18
19
|
if (n) return console.error("XML parse error:", n.textContent), null;
|
|
@@ -45,11 +46,11 @@ function v(e) {
|
|
|
45
46
|
return console.error("Failed to parse SAML metadata:", e), null;
|
|
46
47
|
}
|
|
47
48
|
}
|
|
48
|
-
function
|
|
49
|
-
let a = f(), { canManageSsoConfig:
|
|
50
|
-
let n =
|
|
49
|
+
function b() {
|
|
50
|
+
let a = f(), { canManageSsoConfig: b, isLoading: ee } = t(), te = _("workspace.auth.enterprise-sso")?.value === !0, x = u(null), { ssoConfig: S, oidcConfig: C, isLoading: w, isSaving: T, isDeleting: E, saveSsoConfig: D, deleteSsoConfig: O } = e("burdenoff.com"), { t: k } = p(), A = c((e, t) => {
|
|
51
|
+
let n = k(e);
|
|
51
52
|
return n === e ? t : n;
|
|
52
|
-
}, [
|
|
53
|
+
}, [k]), [j, M] = d("saml"), [N, P] = d(!1), [ne, F] = d(!1), [I, L] = d(null), [R, z] = d(null), [B, V] = d(""), [H, U] = d(!1), [W, G] = d(!1), [K, q] = d({
|
|
53
54
|
client_name: "",
|
|
54
55
|
redirect_uris: "",
|
|
55
56
|
grant_types: ["authorization_code", "refresh_token"],
|
|
@@ -62,37 +63,37 @@ function y() {
|
|
|
62
63
|
enabled: !1
|
|
63
64
|
});
|
|
64
65
|
return l(() => {
|
|
65
|
-
|
|
66
|
-
entityId:
|
|
67
|
-
ssoUrl:
|
|
68
|
-
sloUrl:
|
|
69
|
-
certificate:
|
|
70
|
-
enabled:
|
|
66
|
+
S && $({
|
|
67
|
+
entityId: S.entityId || "",
|
|
68
|
+
ssoUrl: S.ssoUrl || "",
|
|
69
|
+
sloUrl: S.sloUrl || "",
|
|
70
|
+
certificate: S.certificate || "",
|
|
71
|
+
enabled: S.enabled || !1
|
|
71
72
|
});
|
|
72
|
-
}, [
|
|
73
|
+
}, [S]), ee ? /* @__PURE__ */ h("div", {
|
|
73
74
|
className: "max-w-5xl mx-auto p-6",
|
|
74
75
|
children: /* @__PURE__ */ g("div", {
|
|
75
76
|
className: "text-center py-16",
|
|
76
77
|
children: [/* @__PURE__ */ h(r, { className: "w-8 h-8 mx-auto text-text-secondary animate-spin" }), /* @__PURE__ */ h("p", {
|
|
77
78
|
className: "mt-4 text-text-secondary",
|
|
78
|
-
children:
|
|
79
|
+
children: A("auth.sso.loadingPermissions", "Loading permissions...")
|
|
79
80
|
})]
|
|
80
81
|
})
|
|
81
|
-
}) :
|
|
82
|
+
}) : b ? te ? /* @__PURE__ */ g("div", {
|
|
82
83
|
className: "max-w-5xl mx-auto p-6",
|
|
83
84
|
children: [
|
|
84
85
|
/* @__PURE__ */ h(i, {
|
|
85
|
-
open:
|
|
86
|
+
open: ne,
|
|
86
87
|
onOpenChange: F,
|
|
87
|
-
title:
|
|
88
|
-
description:
|
|
89
|
-
confirmText:
|
|
88
|
+
title: A("auth.sso.deleteConfirmTitle", "Delete SSO configuration?"),
|
|
89
|
+
description: A("auth.sso.deleteConfirmDesc", "Users will immediately lose the ability to sign in with this SSO setup until a new configuration is saved."),
|
|
90
|
+
confirmText: A("auth.sso.deleteConfirmButton", "Delete configuration"),
|
|
90
91
|
variant: "danger",
|
|
91
|
-
isPending:
|
|
92
|
+
isPending: E,
|
|
92
93
|
onConfirm: async () => {
|
|
93
94
|
L(null), z(null), o("medium");
|
|
94
95
|
try {
|
|
95
|
-
await
|
|
96
|
+
await O(), s("success"), z(A("auth.sso.deleteSuccess", "SSO configuration deleted successfully.")), F(!1), $({
|
|
96
97
|
entityId: "",
|
|
97
98
|
ssoUrl: "",
|
|
98
99
|
sloUrl: "",
|
|
@@ -100,7 +101,7 @@ function y() {
|
|
|
100
101
|
enabled: !1
|
|
101
102
|
});
|
|
102
103
|
} catch (e) {
|
|
103
|
-
s("error"), L(e instanceof Error ? e.message :
|
|
104
|
+
s("error"), L(e instanceof Error ? e.message : A("auth.sso.deleteFailed", "Failed to delete configuration"));
|
|
104
105
|
}
|
|
105
106
|
}
|
|
106
107
|
}),
|
|
@@ -110,7 +111,7 @@ function y() {
|
|
|
110
111
|
className: "flex items-center gap-4",
|
|
111
112
|
children: [/* @__PURE__ */ h("button", {
|
|
112
113
|
onClick: () => a("/auth/security"),
|
|
113
|
-
"aria-label":
|
|
114
|
+
"aria-label": A("auth.sso.backToSecurity", "Back to Security"),
|
|
114
115
|
className: "p-2 rounded-lg hover:bg-bg-sunken transition-colors",
|
|
115
116
|
children: /* @__PURE__ */ h("svg", {
|
|
116
117
|
className: "w-5 h-5 text-text-secondary",
|
|
@@ -127,31 +128,31 @@ function y() {
|
|
|
127
128
|
})
|
|
128
129
|
}), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h1", {
|
|
129
130
|
className: "text-2xl font-semibold text-text-primary",
|
|
130
|
-
children:
|
|
131
|
+
children: A("auth.sso.title", "Single Sign-On (SSO)")
|
|
131
132
|
}), /* @__PURE__ */ h("p", {
|
|
132
133
|
className: "text-text-secondary mt-1",
|
|
133
|
-
children:
|
|
134
|
+
children: A("auth.sso.description", "Configure enterprise SSO with SAML 2.0 or OIDC")
|
|
134
135
|
})] })]
|
|
135
|
-
}),
|
|
136
|
+
}), S && /* @__PURE__ */ g("div", {
|
|
136
137
|
className: "flex items-center gap-3",
|
|
137
138
|
children: [/* @__PURE__ */ h("span", {
|
|
138
139
|
className: `px-3 py-1 rounded-full text-sm font-medium ${Q.enabled ? "bg-status-success-bg-subtle text-status-success-text" : "bg-bg-sunken text-text-secondary"}`,
|
|
139
|
-
children: Q.enabled ?
|
|
140
|
+
children: Q.enabled ? A("auth.sso.enabled", "Enabled") : A("auth.sso.disabled", "Disabled")
|
|
140
141
|
}), /* @__PURE__ */ h("button", {
|
|
141
142
|
onClick: async () => {
|
|
142
143
|
L(null);
|
|
143
144
|
try {
|
|
144
|
-
await
|
|
145
|
+
await D({
|
|
145
146
|
...Q,
|
|
146
147
|
enabled: !Q.enabled
|
|
147
|
-
}), z(Q.enabled ?
|
|
148
|
+
}), z(Q.enabled ? A("auth.sso.ssoDisabled", "SSO disabled") : A("auth.sso.ssoEnabled", "SSO enabled"));
|
|
148
149
|
} catch (e) {
|
|
149
|
-
L(e instanceof Error ? e.message :
|
|
150
|
+
L(e instanceof Error ? e.message : A("auth.sso.statusUpdateFailed", "Failed to update status"));
|
|
150
151
|
}
|
|
151
152
|
},
|
|
152
|
-
disabled:
|
|
153
|
+
disabled: T,
|
|
153
154
|
className: "px-4 py-2 rounded-lg border border-border-default text-text-primary hover:bg-bg-sunken transition-colors text-sm font-medium",
|
|
154
|
-
children: Q.enabled ?
|
|
155
|
+
children: Q.enabled ? A("auth.sso.disable", "Disable") : A("auth.sso.enable", "Enable")
|
|
155
156
|
})]
|
|
156
157
|
})]
|
|
157
158
|
}),
|
|
@@ -165,7 +166,7 @@ function y() {
|
|
|
165
166
|
}), /* @__PURE__ */ h("button", {
|
|
166
167
|
onClick: () => L(null),
|
|
167
168
|
className: "mt-2 text-sm text-status-error-text hover:underline",
|
|
168
|
-
children:
|
|
169
|
+
children: A("auth.sso.dismiss", "Dismiss")
|
|
169
170
|
})]
|
|
170
171
|
})]
|
|
171
172
|
}),
|
|
@@ -188,7 +189,7 @@ function y() {
|
|
|
188
189
|
}), /* @__PURE__ */ h("button", {
|
|
189
190
|
onClick: () => z(null),
|
|
190
191
|
className: "mt-2 text-sm text-status-success-text hover:underline",
|
|
191
|
-
children:
|
|
192
|
+
children: A("auth.sso.dismiss", "Dismiss")
|
|
192
193
|
})]
|
|
193
194
|
})]
|
|
194
195
|
}),
|
|
@@ -199,42 +200,42 @@ function y() {
|
|
|
199
200
|
children: [
|
|
200
201
|
{
|
|
201
202
|
id: "saml",
|
|
202
|
-
label:
|
|
203
|
+
label: A("auth.sso.samlTab", "SAML 2.0"),
|
|
203
204
|
icon: "🔐"
|
|
204
205
|
},
|
|
205
206
|
{
|
|
206
207
|
id: "oidc",
|
|
207
|
-
label:
|
|
208
|
+
label: A("auth.sso.oidcTab", "OIDC Provider"),
|
|
208
209
|
icon: "🌐"
|
|
209
210
|
},
|
|
210
211
|
{
|
|
211
212
|
id: "clients",
|
|
212
|
-
label:
|
|
213
|
+
label: A("auth.sso.clientsTab", "OIDC Clients"),
|
|
213
214
|
icon: "🔑"
|
|
214
215
|
},
|
|
215
216
|
{
|
|
216
217
|
id: "test",
|
|
217
|
-
label:
|
|
218
|
+
label: A("auth.sso.testTab", "Test SSO"),
|
|
218
219
|
icon: "🧪"
|
|
219
220
|
}
|
|
220
221
|
].map((e) => /* @__PURE__ */ g("button", {
|
|
221
|
-
onClick: () =>
|
|
222
|
-
className: `pb-3 text-sm font-medium transition-colors relative ${
|
|
222
|
+
onClick: () => M(e.id),
|
|
223
|
+
className: `pb-3 text-sm font-medium transition-colors relative ${j === e.id ? "text-text-link" : "text-text-secondary hover:text-text-primary"}`,
|
|
223
224
|
children: [/* @__PURE__ */ g("span", {
|
|
224
225
|
className: "flex items-center gap-2",
|
|
225
226
|
children: [/* @__PURE__ */ h("span", { children: e.icon }), e.label]
|
|
226
|
-
}),
|
|
227
|
+
}), j === e.id && /* @__PURE__ */ h("span", { className: "absolute bottom-0 left-0 right-0 h-0.5 bg-action-primary-bg" })]
|
|
227
228
|
}, e.id))
|
|
228
229
|
})
|
|
229
230
|
}),
|
|
230
|
-
|
|
231
|
+
w && /* @__PURE__ */ g("div", {
|
|
231
232
|
className: "flex items-center justify-center py-12",
|
|
232
233
|
children: [/* @__PURE__ */ h(r, { className: "w-8 h-8 text-text-link animate-spin" }), /* @__PURE__ */ h("span", {
|
|
233
234
|
className: "ml-3 text-text-secondary",
|
|
234
|
-
children:
|
|
235
|
+
children: A("auth.sso.loadingConfig", "Loading configuration...")
|
|
235
236
|
})]
|
|
236
237
|
}),
|
|
237
|
-
!
|
|
238
|
+
!w && j === "saml" && /* @__PURE__ */ g("div", {
|
|
238
239
|
className: "space-y-6",
|
|
239
240
|
children: [
|
|
240
241
|
/* @__PURE__ */ g("div", {
|
|
@@ -242,18 +243,18 @@ function y() {
|
|
|
242
243
|
children: [
|
|
243
244
|
/* @__PURE__ */ h("h3", {
|
|
244
245
|
className: "font-medium text-status-info-text mb-2",
|
|
245
|
-
children:
|
|
246
|
+
children: A("auth.sso.samlConfigTitle", "SAML 2.0 Configuration")
|
|
246
247
|
}),
|
|
247
248
|
/* @__PURE__ */ h("p", {
|
|
248
249
|
className: "text-sm text-status-info-text",
|
|
249
|
-
children:
|
|
250
|
+
children: A("auth.sso.samlConfigDesc", "Configure your Identity Provider (IdP) to enable enterprise SSO. You'll need to get the following information from your IdP (Okta, Azure AD, OneLogin, etc.):")
|
|
250
251
|
}),
|
|
251
252
|
/* @__PURE__ */ g("ul", {
|
|
252
253
|
className: "mt-2 text-sm text-status-info-text list-disc list-inside",
|
|
253
254
|
children: [
|
|
254
|
-
/* @__PURE__ */ h("li", { children:
|
|
255
|
-
/* @__PURE__ */ h("li", { children:
|
|
256
|
-
/* @__PURE__ */ h("li", { children:
|
|
255
|
+
/* @__PURE__ */ h("li", { children: A("auth.sso.entityIdItem", "Entity ID (Issuer URL)") }),
|
|
256
|
+
/* @__PURE__ */ h("li", { children: A("auth.sso.ssoUrlItem", "SSO URL (Login URL)") }),
|
|
257
|
+
/* @__PURE__ */ h("li", { children: A("auth.sso.certificateItem", "X.509 Certificate") })
|
|
257
258
|
]
|
|
258
259
|
})
|
|
259
260
|
]
|
|
@@ -263,11 +264,11 @@ function y() {
|
|
|
263
264
|
children: [
|
|
264
265
|
/* @__PURE__ */ h("h3", {
|
|
265
266
|
className: "text-lg font-medium text-text-primary mb-4",
|
|
266
|
-
children:
|
|
267
|
+
children: A("auth.sso.importMetadata", "Import IdP Metadata")
|
|
267
268
|
}),
|
|
268
269
|
/* @__PURE__ */ h("p", {
|
|
269
270
|
className: "text-sm text-text-secondary mb-4",
|
|
270
|
-
children:
|
|
271
|
+
children: A("auth.sso.importMetadataDesc", "Automatically configure SSO by importing your IdP's metadata XML file or URL.")
|
|
271
272
|
}),
|
|
272
273
|
/* @__PURE__ */ g("div", {
|
|
273
274
|
className: "grid grid-cols-1 md:grid-cols-2 gap-6",
|
|
@@ -276,10 +277,10 @@ function y() {
|
|
|
276
277
|
children: [
|
|
277
278
|
/* @__PURE__ */ h("label", {
|
|
278
279
|
className: "block text-sm font-medium text-text-primary",
|
|
279
|
-
children:
|
|
280
|
+
children: A("auth.sso.uploadFile", "Upload Metadata File")
|
|
280
281
|
}),
|
|
281
282
|
/* @__PURE__ */ h("input", {
|
|
282
|
-
ref:
|
|
283
|
+
ref: x,
|
|
283
284
|
type: "file",
|
|
284
285
|
accept: ".xml,application/xml,text/xml",
|
|
285
286
|
onChange: async (e) => {
|
|
@@ -287,18 +288,18 @@ function y() {
|
|
|
287
288
|
if (t) {
|
|
288
289
|
L(null), U(!0);
|
|
289
290
|
try {
|
|
290
|
-
let e =
|
|
291
|
+
let e = y(await t.text());
|
|
291
292
|
e ? ($({
|
|
292
293
|
...Q,
|
|
293
294
|
entityId: e.entityId,
|
|
294
295
|
ssoUrl: e.ssoUrl,
|
|
295
296
|
sloUrl: e.sloUrl || "",
|
|
296
297
|
certificate: e.certificate
|
|
297
|
-
}), z(
|
|
298
|
+
}), z(A("auth.sso.importSuccess", "SAML metadata imported successfully! Review and save the configuration.")), P(!0)) : L(A("auth.sso.parseError", "Failed to parse SAML metadata. Make sure the file contains valid IdP metadata XML."));
|
|
298
299
|
} catch {
|
|
299
|
-
L(
|
|
300
|
+
L(A("auth.sso.readError", "Failed to read metadata file"));
|
|
300
301
|
} finally {
|
|
301
|
-
U(!1),
|
|
302
|
+
U(!1), x.current && (x.current.value = "");
|
|
302
303
|
}
|
|
303
304
|
}
|
|
304
305
|
},
|
|
@@ -321,7 +322,7 @@ function y() {
|
|
|
321
322
|
})
|
|
322
323
|
}), /* @__PURE__ */ h("span", {
|
|
323
324
|
className: "text-sm text-text-secondary",
|
|
324
|
-
children: H ?
|
|
325
|
+
children: H ? A("auth.sso.importing", "Importing...") : A("auth.sso.chooseFile", "Choose XML file")
|
|
325
326
|
})]
|
|
326
327
|
})
|
|
327
328
|
]
|
|
@@ -329,7 +330,7 @@ function y() {
|
|
|
329
330
|
className: "space-y-3",
|
|
330
331
|
children: [/* @__PURE__ */ h("label", {
|
|
331
332
|
className: "block text-sm font-medium text-text-primary",
|
|
332
|
-
children:
|
|
333
|
+
children: A("auth.sso.fetchFromUrl", "Fetch from URL")
|
|
333
334
|
}), /* @__PURE__ */ g("div", {
|
|
334
335
|
className: "flex gap-2",
|
|
335
336
|
children: [/* @__PURE__ */ h("input", {
|
|
@@ -338,29 +339,29 @@ function y() {
|
|
|
338
339
|
value: B,
|
|
339
340
|
onChange: (e) => V(e.target.value),
|
|
340
341
|
placeholder: "https://idp.example.com/metadata.xml",
|
|
341
|
-
"aria-label":
|
|
342
|
+
"aria-label": A("auth.sso.fetchFromUrl", "Fetch from URL"),
|
|
342
343
|
className: "flex-1 px-4 py-2.5 border border-border-default rounded-xl bg-bg-surface text-text-primary placeholder-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all text-sm"
|
|
343
344
|
}), /* @__PURE__ */ g("button", {
|
|
344
345
|
type: "button",
|
|
345
346
|
onClick: async () => {
|
|
346
347
|
if (!B) {
|
|
347
|
-
L(
|
|
348
|
+
L(A("auth.sso.enterUrl", "Please enter a metadata URL"));
|
|
348
349
|
return;
|
|
349
350
|
}
|
|
350
351
|
L(null), U(!0);
|
|
351
352
|
try {
|
|
352
353
|
let e = await fetch(B);
|
|
353
354
|
if (!e.ok) throw Error(`Failed to fetch: ${e.statusText}`);
|
|
354
|
-
let t =
|
|
355
|
+
let t = y(await e.text());
|
|
355
356
|
t ? ($({
|
|
356
357
|
...Q,
|
|
357
358
|
entityId: t.entityId,
|
|
358
359
|
ssoUrl: t.ssoUrl,
|
|
359
360
|
sloUrl: t.sloUrl || "",
|
|
360
361
|
certificate: t.certificate
|
|
361
|
-
}), z(
|
|
362
|
+
}), z(A("auth.sso.importSuccessFromUrl", "SAML metadata imported successfully! Review and save the configuration.")), P(!0), V("")) : L(A("auth.sso.parseUrlError", "Failed to parse SAML metadata from URL."));
|
|
362
363
|
} catch (e) {
|
|
363
|
-
L(e instanceof Error ? e.message :
|
|
364
|
+
L(e instanceof Error ? e.message : A("auth.sso.fetchError", "Failed to fetch metadata from URL"));
|
|
364
365
|
} finally {
|
|
365
366
|
U(!1);
|
|
366
367
|
}
|
|
@@ -378,7 +379,7 @@ function y() {
|
|
|
378
379
|
strokeWidth: 2,
|
|
379
380
|
d: "M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"
|
|
380
381
|
})
|
|
381
|
-
}),
|
|
382
|
+
}), A("auth.sso.fetch", "Fetch")]
|
|
382
383
|
})]
|
|
383
384
|
})]
|
|
384
385
|
})]
|
|
@@ -390,39 +391,39 @@ function y() {
|
|
|
390
391
|
children: [
|
|
391
392
|
/* @__PURE__ */ h("h3", {
|
|
392
393
|
className: "text-lg font-medium text-text-primary mb-4",
|
|
393
|
-
children:
|
|
394
|
+
children: A("auth.sso.spMetadata", "Service Provider (SP) Metadata")
|
|
394
395
|
}),
|
|
395
396
|
/* @__PURE__ */ h("p", {
|
|
396
397
|
className: "text-sm text-text-secondary mb-4",
|
|
397
|
-
children:
|
|
398
|
+
children: A("auth.sso.spMetadataDesc", "Provide these values to your Identity Provider when setting up the SAML integration:")
|
|
398
399
|
}),
|
|
399
400
|
/* @__PURE__ */ g("div", {
|
|
400
401
|
className: "space-y-4",
|
|
401
402
|
children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
402
403
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
403
|
-
children:
|
|
404
|
+
children: A("auth.sso.spEntityId", "SP Entity ID / Audience URI")
|
|
404
405
|
}), /* @__PURE__ */ g("div", {
|
|
405
406
|
className: "flex items-center gap-2",
|
|
406
407
|
children: [/* @__PURE__ */ g("code", {
|
|
407
408
|
className: "flex-1 px-3 py-2 rounded-lg bg-bg-sunken text-sm text-text-primary font-mono",
|
|
408
409
|
children: [window.location.origin, "/auth/saml/metadata"]
|
|
409
410
|
}), /* @__PURE__ */ h("button", {
|
|
410
|
-
onClick: () => void
|
|
411
|
+
onClick: () => void v(`${window.location.origin}/auth/saml/metadata`),
|
|
411
412
|
className: "px-3 py-2 rounded-lg border border-border-default text-text-secondary hover:bg-bg-sunken",
|
|
412
|
-
children:
|
|
413
|
+
children: A("auth.sso.copy", "Copy")
|
|
413
414
|
})]
|
|
414
415
|
})] }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
415
416
|
className: "block text-sm font-medium text-text-primary mb-1",
|
|
416
|
-
children:
|
|
417
|
+
children: A("auth.sso.acsUrl", "Assertion Consumer Service (ACS) URL")
|
|
417
418
|
}), /* @__PURE__ */ g("div", {
|
|
418
419
|
className: "flex items-center gap-2",
|
|
419
420
|
children: [/* @__PURE__ */ g("code", {
|
|
420
421
|
className: "flex-1 px-3 py-2 rounded-lg bg-bg-sunken text-sm text-text-primary font-mono",
|
|
421
422
|
children: [window.location.origin, "/auth/sso/callback"]
|
|
422
423
|
}), /* @__PURE__ */ h("button", {
|
|
423
|
-
onClick: () => void
|
|
424
|
+
onClick: () => void v(`${window.location.origin}/auth/sso/callback`),
|
|
424
425
|
className: "px-3 py-2 rounded-lg border border-border-default text-text-secondary hover:bg-bg-sunken",
|
|
425
|
-
children:
|
|
426
|
+
children: A("auth.sso.copy", "Copy")
|
|
426
427
|
})]
|
|
427
428
|
})] })]
|
|
428
429
|
})
|
|
@@ -432,9 +433,9 @@ function y() {
|
|
|
432
433
|
onSubmit: async (e) => {
|
|
433
434
|
e.preventDefault(), L(null), z(null);
|
|
434
435
|
try {
|
|
435
|
-
await
|
|
436
|
+
await D(Q), z(A("auth.sso.saveSuccess", "SSO configuration saved successfully!")), P(!1);
|
|
436
437
|
} catch (e) {
|
|
437
|
-
L(e instanceof Error ? e.message :
|
|
438
|
+
L(e instanceof Error ? e.message : A("auth.sso.saveFailed", "Failed to save configuration"));
|
|
438
439
|
}
|
|
439
440
|
},
|
|
440
441
|
className: "p-6 rounded-xl border border-border-subtle bg-bg-surface",
|
|
@@ -443,12 +444,12 @@ function y() {
|
|
|
443
444
|
className: "flex items-center justify-between mb-6",
|
|
444
445
|
children: [/* @__PURE__ */ h("h3", {
|
|
445
446
|
className: "text-lg font-medium text-text-primary",
|
|
446
|
-
children:
|
|
447
|
-
}), !
|
|
447
|
+
children: A("auth.sso.idpSettings", "Identity Provider (IdP) Settings")
|
|
448
|
+
}), !N && S && /* @__PURE__ */ h("button", {
|
|
448
449
|
type: "button",
|
|
449
|
-
onClick: () =>
|
|
450
|
+
onClick: () => P(!0),
|
|
450
451
|
className: "px-4 py-2 rounded-lg border border-status-info-border text-text-link hover:bg-status-info-bg-subtle text-sm font-medium transition-colors",
|
|
451
|
-
children:
|
|
452
|
+
children: A("auth.sso.editConfig", "Edit Configuration")
|
|
452
453
|
})]
|
|
453
454
|
}),
|
|
454
455
|
/* @__PURE__ */ g("div", {
|
|
@@ -459,7 +460,7 @@ function y() {
|
|
|
459
460
|
htmlFor: "sso-entity-id",
|
|
460
461
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
461
462
|
children: [
|
|
462
|
-
|
|
463
|
+
A("auth.sso.idpEntityId", "IdP Entity ID / Issuer URL"),
|
|
463
464
|
" ",
|
|
464
465
|
/* @__PURE__ */ h("span", {
|
|
465
466
|
className: "text-status-error-text",
|
|
@@ -476,8 +477,8 @@ function y() {
|
|
|
476
477
|
...Q,
|
|
477
478
|
entityId: e.target.value
|
|
478
479
|
}),
|
|
479
|
-
disabled: !
|
|
480
|
-
placeholder:
|
|
480
|
+
disabled: !N && !!S,
|
|
481
|
+
placeholder: A("auth.sso.idpEntityIdPlaceholder", "https://your-idp.example.com/saml/metadata"),
|
|
481
482
|
required: !0,
|
|
482
483
|
"aria-required": "true",
|
|
483
484
|
"aria-describedby": "sso-entity-id-hint",
|
|
@@ -486,7 +487,7 @@ function y() {
|
|
|
486
487
|
/* @__PURE__ */ h("p", {
|
|
487
488
|
id: "sso-entity-id-hint",
|
|
488
489
|
className: "mt-1 text-xs text-text-secondary",
|
|
489
|
-
children:
|
|
490
|
+
children: A("auth.sso.idpEntityIdHelper", "The unique identifier of your Identity Provider")
|
|
490
491
|
})
|
|
491
492
|
] }),
|
|
492
493
|
/* @__PURE__ */ g("div", { children: [
|
|
@@ -494,7 +495,7 @@ function y() {
|
|
|
494
495
|
htmlFor: "sso-sso-url",
|
|
495
496
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
496
497
|
children: [
|
|
497
|
-
|
|
498
|
+
A("auth.sso.ssoUrl", "SSO URL (Login URL)"),
|
|
498
499
|
" ",
|
|
499
500
|
/* @__PURE__ */ h("span", {
|
|
500
501
|
className: "text-status-error-text",
|
|
@@ -511,8 +512,8 @@ function y() {
|
|
|
511
512
|
...Q,
|
|
512
513
|
ssoUrl: e.target.value
|
|
513
514
|
}),
|
|
514
|
-
disabled: !
|
|
515
|
-
placeholder:
|
|
515
|
+
disabled: !N && !!S,
|
|
516
|
+
placeholder: A("auth.sso.ssoUrlPlaceholder", "https://your-idp.example.com/saml/sso"),
|
|
516
517
|
required: !0,
|
|
517
518
|
"aria-required": "true",
|
|
518
519
|
"aria-describedby": "sso-sso-url-hint",
|
|
@@ -521,14 +522,14 @@ function y() {
|
|
|
521
522
|
/* @__PURE__ */ h("p", {
|
|
522
523
|
id: "sso-sso-url-hint",
|
|
523
524
|
className: "mt-1 text-xs text-text-secondary",
|
|
524
|
-
children:
|
|
525
|
+
children: A("auth.sso.ssoUrlHelper", "The URL where users are redirected to authenticate")
|
|
525
526
|
})
|
|
526
527
|
] }),
|
|
527
528
|
/* @__PURE__ */ g("div", { children: [
|
|
528
529
|
/* @__PURE__ */ h("label", {
|
|
529
530
|
htmlFor: "sso-slo-url",
|
|
530
531
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
531
|
-
children:
|
|
532
|
+
children: A("auth.sso.sloUrl", "Single Logout (SLO) URL")
|
|
532
533
|
}),
|
|
533
534
|
/* @__PURE__ */ h("input", {
|
|
534
535
|
id: "sso-slo-url",
|
|
@@ -538,15 +539,15 @@ function y() {
|
|
|
538
539
|
...Q,
|
|
539
540
|
sloUrl: e.target.value
|
|
540
541
|
}),
|
|
541
|
-
disabled: !
|
|
542
|
-
placeholder:
|
|
542
|
+
disabled: !N && !!S,
|
|
543
|
+
placeholder: A("auth.sso.sloUrlPlaceholder", "https://your-idp.example.com/saml/slo"),
|
|
543
544
|
"aria-describedby": "sso-slo-url-hint",
|
|
544
545
|
className: "block w-full px-4 py-3 border border-border-default rounded-xl bg-bg-surface text-text-primary placeholder-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg disabled:opacity-60 disabled:cursor-not-allowed transition-all"
|
|
545
546
|
}),
|
|
546
547
|
/* @__PURE__ */ h("p", {
|
|
547
548
|
id: "sso-slo-url-hint",
|
|
548
549
|
className: "mt-1 text-xs text-text-secondary",
|
|
549
|
-
children:
|
|
550
|
+
children: A("auth.sso.sloUrlHelper", "Optional: URL for single logout across all applications")
|
|
550
551
|
})
|
|
551
552
|
] }),
|
|
552
553
|
/* @__PURE__ */ g("div", { children: [
|
|
@@ -554,7 +555,7 @@ function y() {
|
|
|
554
555
|
htmlFor: "sso-certificate",
|
|
555
556
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
556
557
|
children: [
|
|
557
|
-
|
|
558
|
+
A("auth.sso.certificate", "X.509 Certificate"),
|
|
558
559
|
" ",
|
|
559
560
|
/* @__PURE__ */ h("span", {
|
|
560
561
|
className: "text-status-error-text",
|
|
@@ -570,8 +571,8 @@ function y() {
|
|
|
570
571
|
...Q,
|
|
571
572
|
certificate: e.target.value
|
|
572
573
|
}),
|
|
573
|
-
disabled: !
|
|
574
|
-
placeholder:
|
|
574
|
+
disabled: !N && !!S,
|
|
575
|
+
placeholder: A("auth.sso.certificatePlaceholder", "-----BEGIN CERTIFICATE-----\nMIIDpDCCAoygAwIBAgIGAX...\n-----END CERTIFICATE-----"),
|
|
575
576
|
required: !0,
|
|
576
577
|
"aria-required": "true",
|
|
577
578
|
"aria-describedby": "sso-certificate-hint",
|
|
@@ -581,67 +582,67 @@ function y() {
|
|
|
581
582
|
/* @__PURE__ */ h("p", {
|
|
582
583
|
id: "sso-certificate-hint",
|
|
583
584
|
className: "mt-1 text-xs text-text-secondary",
|
|
584
|
-
children:
|
|
585
|
+
children: A("auth.sso.certificateHelper", "The public X.509 certificate from your IdP for signature verification")
|
|
585
586
|
})
|
|
586
587
|
] })
|
|
587
588
|
]
|
|
588
589
|
}),
|
|
589
|
-
(
|
|
590
|
+
(N || !S) && /* @__PURE__ */ g("div", {
|
|
590
591
|
className: "mt-6 flex items-center gap-3",
|
|
591
592
|
children: [/* @__PURE__ */ h("button", {
|
|
592
593
|
type: "submit",
|
|
593
|
-
disabled:
|
|
594
|
+
disabled: T,
|
|
594
595
|
className: "auth-primary-button flex items-center gap-2 px-6 py-3 font-medium",
|
|
595
|
-
children:
|
|
596
|
-
}),
|
|
596
|
+
children: T ? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(r, { className: "w-4 h-4 animate-spin" }), A("auth.sso.saving", "Saving...")] }) : A("auth.sso.saveConfig", "Save Configuration")
|
|
597
|
+
}), N && /* @__PURE__ */ h("button", {
|
|
597
598
|
type: "button",
|
|
598
599
|
onClick: () => {
|
|
599
|
-
|
|
600
|
-
entityId:
|
|
601
|
-
ssoUrl:
|
|
602
|
-
sloUrl:
|
|
603
|
-
certificate:
|
|
604
|
-
enabled:
|
|
600
|
+
P(!1), S && $({
|
|
601
|
+
entityId: S.entityId || "",
|
|
602
|
+
ssoUrl: S.ssoUrl || "",
|
|
603
|
+
sloUrl: S.sloUrl || "",
|
|
604
|
+
certificate: S.certificate || "",
|
|
605
|
+
enabled: S.enabled || !1
|
|
605
606
|
});
|
|
606
607
|
},
|
|
607
608
|
className: "px-6 py-3 rounded-xl border border-border-default text-text-primary font-medium hover:bg-bg-sunken transition-colors",
|
|
608
|
-
children:
|
|
609
|
+
children: A("auth.sso.cancel", "Cancel")
|
|
609
610
|
})]
|
|
610
611
|
})
|
|
611
612
|
]
|
|
612
613
|
}),
|
|
613
|
-
|
|
614
|
+
S && /* @__PURE__ */ g("div", {
|
|
614
615
|
className: "p-6 rounded-xl border border-status-error-border bg-status-error-bg-subtle",
|
|
615
616
|
children: [
|
|
616
617
|
/* @__PURE__ */ h("h3", {
|
|
617
618
|
className: "text-lg font-medium text-status-error-text mb-2",
|
|
618
|
-
children:
|
|
619
|
+
children: A("auth.sso.dangerZone", "Danger Zone")
|
|
619
620
|
}),
|
|
620
621
|
/* @__PURE__ */ h("p", {
|
|
621
622
|
className: "text-sm text-status-error-text mb-4",
|
|
622
|
-
children:
|
|
623
|
+
children: A("auth.sso.dangerZoneDesc", "Deleting the SSO configuration will prevent users from signing in with their enterprise credentials. This action cannot be undone.")
|
|
623
624
|
}),
|
|
624
625
|
/* @__PURE__ */ h("button", {
|
|
625
626
|
onClick: () => F(!0),
|
|
626
|
-
disabled:
|
|
627
|
+
disabled: E,
|
|
627
628
|
className: "px-4 py-2 rounded-lg bg-status-error-bg text-white font-medium hover:bg-status-error-bg-hover disabled:opacity-50 transition-colors flex items-center gap-2",
|
|
628
|
-
children:
|
|
629
|
+
children: E ? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(r, { className: "w-4 h-4 animate-spin" }), A("auth.sso.deleting", "Deleting...")] }) : A("auth.sso.deleteConfig", "Delete SSO Configuration")
|
|
629
630
|
})
|
|
630
631
|
]
|
|
631
632
|
})
|
|
632
633
|
]
|
|
633
634
|
}),
|
|
634
|
-
!
|
|
635
|
+
!w && j === "oidc" && /* @__PURE__ */ g("div", {
|
|
635
636
|
className: "space-y-6",
|
|
636
637
|
children: [
|
|
637
638
|
/* @__PURE__ */ g("div", {
|
|
638
639
|
className: "p-4 rounded-xl bg-accent-purple-subtle border border-accent-purple-subtle",
|
|
639
640
|
children: [/* @__PURE__ */ h("h3", {
|
|
640
641
|
className: "font-medium text-accent-purple mb-2",
|
|
641
|
-
children:
|
|
642
|
+
children: A("auth.sso.oidcProviderInfo", "OIDC Provider Information")
|
|
642
643
|
}), /* @__PURE__ */ h("p", {
|
|
643
644
|
className: "text-sm text-accent-purple",
|
|
644
|
-
children:
|
|
645
|
+
children: A("auth.sso.oidcProviderInfoDesc", "Your auth service acts as an OpenID Connect Provider. This allows other applications to authenticate users through your system using standard OAuth 2.0/OIDC flows.")
|
|
645
646
|
})]
|
|
646
647
|
}),
|
|
647
648
|
/* @__PURE__ */ g("div", {
|
|
@@ -649,56 +650,56 @@ function y() {
|
|
|
649
650
|
children: [
|
|
650
651
|
/* @__PURE__ */ h("h3", {
|
|
651
652
|
className: "text-lg font-medium text-text-primary mb-4",
|
|
652
|
-
children:
|
|
653
|
+
children: A("auth.sso.discoveryEndpoint", "Discovery Endpoint")
|
|
653
654
|
}),
|
|
654
655
|
/* @__PURE__ */ h("p", {
|
|
655
656
|
className: "text-sm text-text-secondary mb-4",
|
|
656
|
-
children:
|
|
657
|
+
children: A("auth.sso.discoveryEndpointDesc", "Applications can auto-configure by fetching the OpenID Connect Discovery document:")
|
|
657
658
|
}),
|
|
658
659
|
/* @__PURE__ */ g("div", {
|
|
659
660
|
className: "flex items-center gap-2",
|
|
660
661
|
children: [/* @__PURE__ */ h("code", {
|
|
661
662
|
className: "flex-1 px-3 py-2 rounded-lg bg-bg-sunken text-sm text-text-primary font-mono break-all",
|
|
662
|
-
children:
|
|
663
|
+
children: C?.issuer ? `${C.issuer}/.well-known/openid-configuration` : "Discovery endpoint unavailable until OIDC is configured"
|
|
663
664
|
}), /* @__PURE__ */ h("button", {
|
|
664
665
|
onClick: () => {
|
|
665
|
-
let e =
|
|
666
|
-
e &&
|
|
666
|
+
let e = C?.issuer ? `${C.issuer}/.well-known/openid-configuration` : "";
|
|
667
|
+
e && v(e);
|
|
667
668
|
},
|
|
668
|
-
disabled: !
|
|
669
|
+
disabled: !C?.issuer,
|
|
669
670
|
className: "px-3 py-2 rounded-lg border border-border-default text-text-secondary hover:bg-bg-sunken flex-shrink-0",
|
|
670
|
-
children:
|
|
671
|
+
children: A("auth.sso.copy", "Copy")
|
|
671
672
|
})]
|
|
672
673
|
})
|
|
673
674
|
]
|
|
674
675
|
}),
|
|
675
|
-
|
|
676
|
+
C && /* @__PURE__ */ g("div", {
|
|
676
677
|
className: "p-6 rounded-xl border border-border-subtle bg-bg-surface",
|
|
677
678
|
children: [/* @__PURE__ */ h("h3", {
|
|
678
679
|
className: "text-lg font-medium text-text-primary mb-4",
|
|
679
|
-
children:
|
|
680
|
+
children: A("auth.sso.oidcEndpoints", "OIDC Endpoints")
|
|
680
681
|
}), /* @__PURE__ */ h("div", {
|
|
681
682
|
className: "space-y-4",
|
|
682
683
|
children: [
|
|
683
684
|
{
|
|
684
|
-
label:
|
|
685
|
-
value:
|
|
685
|
+
label: A("auth.sso.issuer", "Issuer"),
|
|
686
|
+
value: C.issuer
|
|
686
687
|
},
|
|
687
688
|
{
|
|
688
|
-
label:
|
|
689
|
-
value:
|
|
689
|
+
label: A("auth.sso.authorizationEndpoint", "Authorization Endpoint"),
|
|
690
|
+
value: C.authorizationEndpoint
|
|
690
691
|
},
|
|
691
692
|
{
|
|
692
|
-
label:
|
|
693
|
-
value:
|
|
693
|
+
label: A("auth.sso.tokenEndpoint", "Token Endpoint"),
|
|
694
|
+
value: C.tokenEndpoint
|
|
694
695
|
},
|
|
695
696
|
{
|
|
696
|
-
label:
|
|
697
|
-
value:
|
|
697
|
+
label: A("auth.sso.userinfoEndpoint", "UserInfo Endpoint"),
|
|
698
|
+
value: C.userinfoEndpoint
|
|
698
699
|
},
|
|
699
700
|
{
|
|
700
|
-
label:
|
|
701
|
-
value:
|
|
701
|
+
label: A("auth.sso.jwksUri", "JWKS URI"),
|
|
702
|
+
value: C.jwksUri
|
|
702
703
|
}
|
|
703
704
|
].map((e) => /* @__PURE__ */ g("div", {
|
|
704
705
|
className: "flex items-start gap-4",
|
|
@@ -716,32 +717,32 @@ function y() {
|
|
|
716
717
|
className: "p-6 rounded-xl border border-border-subtle bg-bg-surface",
|
|
717
718
|
children: [/* @__PURE__ */ h("h3", {
|
|
718
719
|
className: "text-lg font-medium text-text-primary mb-4",
|
|
719
|
-
children:
|
|
720
|
+
children: A("auth.sso.supportedFeatures", "Supported Features")
|
|
720
721
|
}), /* @__PURE__ */ h("div", {
|
|
721
722
|
className: "grid grid-cols-2 gap-4",
|
|
722
723
|
children: [
|
|
723
724
|
{
|
|
724
|
-
name:
|
|
725
|
+
name: A("auth.sso.featAuthCodePkce", "Authorization Code + PKCE"),
|
|
725
726
|
status: !0
|
|
726
727
|
},
|
|
727
728
|
{
|
|
728
|
-
name:
|
|
729
|
+
name: A("auth.sso.featClientCreds", "Client Credentials"),
|
|
729
730
|
status: !0
|
|
730
731
|
},
|
|
731
732
|
{
|
|
732
|
-
name:
|
|
733
|
+
name: A("auth.sso.featDeviceAuth", "Device Authorization"),
|
|
733
734
|
status: !0
|
|
734
735
|
},
|
|
735
736
|
{
|
|
736
|
-
name:
|
|
737
|
+
name: A("auth.sso.featRefreshTokens", "Refresh Tokens"),
|
|
737
738
|
status: !0
|
|
738
739
|
},
|
|
739
740
|
{
|
|
740
|
-
name:
|
|
741
|
+
name: A("auth.sso.featTokenIntrospection", "Token Introspection"),
|
|
741
742
|
status: !0
|
|
742
743
|
},
|
|
743
744
|
{
|
|
744
|
-
name:
|
|
745
|
+
name: A("auth.sso.featTokenRevocation", "Token Revocation"),
|
|
745
746
|
status: !0
|
|
746
747
|
}
|
|
747
748
|
].map((e) => /* @__PURE__ */ g("div", {
|
|
@@ -755,17 +756,17 @@ function y() {
|
|
|
755
756
|
})
|
|
756
757
|
]
|
|
757
758
|
}),
|
|
758
|
-
!
|
|
759
|
+
!w && j === "clients" && /* @__PURE__ */ g("div", {
|
|
759
760
|
className: "space-y-6",
|
|
760
761
|
children: [
|
|
761
762
|
/* @__PURE__ */ g("div", {
|
|
762
763
|
className: "p-4 rounded-xl bg-status-warning-bg-subtle border border-status-warning-border",
|
|
763
764
|
children: [/* @__PURE__ */ h("h3", {
|
|
764
765
|
className: "font-medium text-status-warning-text mb-2",
|
|
765
|
-
children:
|
|
766
|
+
children: A("auth.sso.clientManagement", "OIDC Client Management")
|
|
766
767
|
}), /* @__PURE__ */ h("p", {
|
|
767
768
|
className: "text-sm text-status-warning-text",
|
|
768
|
-
children:
|
|
769
|
+
children: A("auth.sso.clientManagementDesc", "Register applications that can authenticate users through your OIDC provider. Each client gets unique credentials to use in the OAuth 2.0 / OIDC flow.")
|
|
769
770
|
})]
|
|
770
771
|
}),
|
|
771
772
|
X && /* @__PURE__ */ g("div", {
|
|
@@ -774,10 +775,10 @@ function y() {
|
|
|
774
775
|
className: "flex items-start justify-between mb-4",
|
|
775
776
|
children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("h3", {
|
|
776
777
|
className: "text-lg font-medium text-status-success-text",
|
|
777
|
-
children:
|
|
778
|
+
children: A("auth.sso.clientCreatedTitle", "Client Created Successfully!")
|
|
778
779
|
}), /* @__PURE__ */ h("p", {
|
|
779
780
|
className: "text-sm text-status-success-text mt-1",
|
|
780
|
-
children:
|
|
781
|
+
children: A("auth.sso.clientCreatedDesc", "Save these credentials securely. The client secret will not be shown again.")
|
|
781
782
|
})] }), /* @__PURE__ */ h("button", {
|
|
782
783
|
onClick: () => Z(null),
|
|
783
784
|
className: "text-status-success-text hover:text-status-success-text",
|
|
@@ -799,35 +800,35 @@ function y() {
|
|
|
799
800
|
children: [
|
|
800
801
|
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
801
802
|
className: "block text-xs font-medium text-status-success-text mb-1",
|
|
802
|
-
children:
|
|
803
|
+
children: A("auth.sso.clientId", "Client ID")
|
|
803
804
|
}), /* @__PURE__ */ g("div", {
|
|
804
805
|
className: "flex gap-2",
|
|
805
806
|
children: [/* @__PURE__ */ h("code", {
|
|
806
807
|
className: "flex-1 px-3 py-2 rounded-lg bg-bg-surface text-sm font-mono border border-status-success-border",
|
|
807
808
|
children: X.client_id
|
|
808
809
|
}), /* @__PURE__ */ h("button", {
|
|
809
|
-
onClick: () => void
|
|
810
|
+
onClick: () => void v(X.client_id),
|
|
810
811
|
className: "px-3 py-2 rounded-lg bg-status-success-bg text-white text-sm hover:bg-status-success-bg",
|
|
811
|
-
children:
|
|
812
|
+
children: A("auth.sso.copy", "Copy")
|
|
812
813
|
})]
|
|
813
814
|
})] }),
|
|
814
815
|
X.client_secret && /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
815
816
|
className: "block text-xs font-medium text-status-success-text mb-1",
|
|
816
|
-
children:
|
|
817
|
+
children: A("auth.sso.clientSecret", "Client Secret (save now!)")
|
|
817
818
|
}), /* @__PURE__ */ g("div", {
|
|
818
819
|
className: "flex gap-2",
|
|
819
820
|
children: [/* @__PURE__ */ h("code", {
|
|
820
821
|
className: "flex-1 px-3 py-2 rounded-lg bg-bg-surface text-sm font-mono border border-status-success-border",
|
|
821
822
|
children: X.client_secret
|
|
822
823
|
}), /* @__PURE__ */ h("button", {
|
|
823
|
-
onClick: () => void
|
|
824
|
+
onClick: () => void v(X.client_secret || ""),
|
|
824
825
|
className: "px-3 py-2 rounded-lg bg-status-success-bg text-white text-sm hover:bg-status-success-bg",
|
|
825
|
-
children:
|
|
826
|
+
children: A("auth.sso.copy", "Copy")
|
|
826
827
|
})]
|
|
827
828
|
})] }),
|
|
828
829
|
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
829
830
|
className: "block text-xs font-medium text-status-success-text mb-1",
|
|
830
|
-
children:
|
|
831
|
+
children: A("auth.sso.redirectUris", "Redirect URIs")
|
|
831
832
|
}), /* @__PURE__ */ h("code", {
|
|
832
833
|
className: "block px-3 py-2 rounded-lg bg-bg-surface text-sm font-mono border border-status-success-border",
|
|
833
834
|
children: X.redirect_uris.join(", ")
|
|
@@ -841,7 +842,7 @@ function y() {
|
|
|
841
842
|
className: "flex items-center justify-between mb-6",
|
|
842
843
|
children: [/* @__PURE__ */ h("h3", {
|
|
843
844
|
className: "text-lg font-medium text-text-primary",
|
|
844
|
-
children:
|
|
845
|
+
children: A("auth.sso.registerClient", "Register New Client")
|
|
845
846
|
}), !W && /* @__PURE__ */ g("button", {
|
|
846
847
|
onClick: () => G(!0),
|
|
847
848
|
className: "px-4 py-2 rounded-lg bg-action-primary-bg text-white font-medium hover:bg-action-primary-bg-hover transition-colors flex items-center gap-2",
|
|
@@ -856,7 +857,7 @@ function y() {
|
|
|
856
857
|
strokeWidth: 2,
|
|
857
858
|
d: "M12 4v16m8-8H4"
|
|
858
859
|
})
|
|
859
|
-
}),
|
|
860
|
+
}), A("auth.sso.newClient", "New Client")]
|
|
860
861
|
})]
|
|
861
862
|
}), W ? /* @__PURE__ */ g("div", {
|
|
862
863
|
className: "space-y-5",
|
|
@@ -865,7 +866,7 @@ function y() {
|
|
|
865
866
|
htmlFor: "oidc-client-name",
|
|
866
867
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
867
868
|
children: [
|
|
868
|
-
|
|
869
|
+
A("auth.sso.clientName", "Client Name"),
|
|
869
870
|
" ",
|
|
870
871
|
/* @__PURE__ */ h("span", {
|
|
871
872
|
className: "text-status-error-text",
|
|
@@ -881,7 +882,7 @@ function y() {
|
|
|
881
882
|
...K,
|
|
882
883
|
client_name: e.target.value
|
|
883
884
|
}),
|
|
884
|
-
placeholder:
|
|
885
|
+
placeholder: A("auth.sso.clientNamePlaceholder", "My Application"),
|
|
885
886
|
"aria-required": "true",
|
|
886
887
|
className: "block w-full px-4 py-3 border border-border-default rounded-xl bg-bg-surface text-text-primary placeholder-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all"
|
|
887
888
|
})] }),
|
|
@@ -890,7 +891,7 @@ function y() {
|
|
|
890
891
|
htmlFor: "oidc-redirect-uris",
|
|
891
892
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
892
893
|
children: [
|
|
893
|
-
|
|
894
|
+
A("auth.sso.redirectUris", "Redirect URIs"),
|
|
894
895
|
" ",
|
|
895
896
|
/* @__PURE__ */ h("span", {
|
|
896
897
|
className: "text-status-error-text",
|
|
@@ -907,7 +908,7 @@ function y() {
|
|
|
907
908
|
...K,
|
|
908
909
|
redirect_uris: e.target.value
|
|
909
910
|
}),
|
|
910
|
-
placeholder:
|
|
911
|
+
placeholder: A("auth.sso.redirectUrisPlaceholder", "http://localhost:3000/callback, https://app.example.com/callback"),
|
|
911
912
|
"aria-required": "true",
|
|
912
913
|
"aria-describedby": "oidc-redirect-uris-hint",
|
|
913
914
|
className: "block w-full px-4 py-3 border border-border-default rounded-xl bg-bg-surface text-text-primary placeholder-text-tertiary focus:outline-none focus:ring-2 focus:ring-action-primary-bg/20 focus:border-action-primary-bg transition-all"
|
|
@@ -915,12 +916,12 @@ function y() {
|
|
|
915
916
|
/* @__PURE__ */ h("p", {
|
|
916
917
|
id: "oidc-redirect-uris-hint",
|
|
917
918
|
className: "mt-1 text-xs text-text-secondary",
|
|
918
|
-
children:
|
|
919
|
+
children: A("auth.sso.redirectUrisHelper", "Separate multiple URIs with commas")
|
|
919
920
|
})
|
|
920
921
|
] }),
|
|
921
922
|
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
922
923
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
923
|
-
children:
|
|
924
|
+
children: A("auth.sso.grantTypes", "Grant Types")
|
|
924
925
|
}), /* @__PURE__ */ h("div", {
|
|
925
926
|
className: "flex flex-wrap gap-3",
|
|
926
927
|
children: [
|
|
@@ -951,7 +952,7 @@ function y() {
|
|
|
951
952
|
/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ h("label", {
|
|
952
953
|
htmlFor: "oidc-token-auth-method",
|
|
953
954
|
className: "block text-sm font-medium text-text-primary mb-2",
|
|
954
|
-
children:
|
|
955
|
+
children: A("auth.sso.tokenEndpointAuth", "Token Endpoint Auth Method")
|
|
955
956
|
}), /* @__PURE__ */ g("select", {
|
|
956
957
|
id: "oidc-token-auth-method",
|
|
957
958
|
value: K.token_endpoint_auth_method,
|
|
@@ -963,15 +964,15 @@ function y() {
|
|
|
963
964
|
children: [
|
|
964
965
|
/* @__PURE__ */ h("option", {
|
|
965
966
|
value: "none",
|
|
966
|
-
children:
|
|
967
|
+
children: A("auth.sso.tokenAuthNone", "None (Public Client - SPAs, Mobile Apps)")
|
|
967
968
|
}),
|
|
968
969
|
/* @__PURE__ */ h("option", {
|
|
969
970
|
value: "client_secret_basic",
|
|
970
|
-
children:
|
|
971
|
+
children: A("auth.sso.tokenAuthBasic", "Client Secret Basic")
|
|
971
972
|
}),
|
|
972
973
|
/* @__PURE__ */ h("option", {
|
|
973
974
|
value: "client_secret_post",
|
|
974
|
-
children:
|
|
975
|
+
children: A("auth.sso.tokenAuthPost", "Client Secret Post")
|
|
975
976
|
})
|
|
976
977
|
]
|
|
977
978
|
})] }),
|
|
@@ -980,13 +981,13 @@ function y() {
|
|
|
980
981
|
children: [/* @__PURE__ */ h("button", {
|
|
981
982
|
onClick: async () => {
|
|
982
983
|
if (!K.client_name || !K.redirect_uris) {
|
|
983
|
-
L(
|
|
984
|
+
L(A("auth.sso.clientRequired", "Client name and redirect URI are required"));
|
|
984
985
|
return;
|
|
985
986
|
}
|
|
986
987
|
Y(!0), L(null);
|
|
987
988
|
try {
|
|
988
|
-
let e =
|
|
989
|
-
if (!e) throw Error(
|
|
989
|
+
let e = C?.registrationEndpoint;
|
|
990
|
+
if (!e) throw Error(A("auth.sso.oidcNotConfigured", "OIDC dynamic client registration is not configured for this environment."));
|
|
990
991
|
let t = await fetch(e, {
|
|
991
992
|
method: "POST",
|
|
992
993
|
headers: { "Content-Type": "application/json" },
|
|
@@ -1002,21 +1003,21 @@ function y() {
|
|
|
1002
1003
|
let e = await t.json();
|
|
1003
1004
|
throw Error(e.error_description || e.error || "Registration failed");
|
|
1004
1005
|
}
|
|
1005
|
-
Z(await t.json()), z(
|
|
1006
|
+
Z(await t.json()), z(A("auth.sso.clientRegistered", "OIDC client registered successfully! Save the client credentials.")), G(!1), q({
|
|
1006
1007
|
client_name: "",
|
|
1007
1008
|
redirect_uris: "",
|
|
1008
1009
|
grant_types: ["authorization_code", "refresh_token"],
|
|
1009
1010
|
token_endpoint_auth_method: "none"
|
|
1010
1011
|
});
|
|
1011
1012
|
} catch (e) {
|
|
1012
|
-
L(e instanceof Error ? e.message :
|
|
1013
|
+
L(e instanceof Error ? e.message : A("auth.sso.registerFailed", "Failed to register client"));
|
|
1013
1014
|
} finally {
|
|
1014
1015
|
Y(!1);
|
|
1015
1016
|
}
|
|
1016
1017
|
},
|
|
1017
1018
|
disabled: J,
|
|
1018
1019
|
className: "auth-primary-button flex items-center gap-2 px-6 py-3 font-medium",
|
|
1019
|
-
children: J ? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(r, { className: "w-4 h-4 animate-spin" }),
|
|
1020
|
+
children: J ? /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h(r, { className: "w-4 h-4 animate-spin" }), A("auth.sso.registering", "Registering...")] }) : A("auth.sso.registerClientButton", "Register Client")
|
|
1020
1021
|
}), /* @__PURE__ */ h("button", {
|
|
1021
1022
|
onClick: () => {
|
|
1022
1023
|
G(!1), q({
|
|
@@ -1027,7 +1028,7 @@ function y() {
|
|
|
1027
1028
|
});
|
|
1028
1029
|
},
|
|
1029
1030
|
className: "px-6 py-3 rounded-xl border border-border-default text-text-primary font-medium hover:bg-bg-sunken transition-colors",
|
|
1030
|
-
children:
|
|
1031
|
+
children: A("auth.sso.cancel", "Cancel")
|
|
1031
1032
|
})]
|
|
1032
1033
|
})
|
|
1033
1034
|
]
|
|
@@ -1046,7 +1047,7 @@ function y() {
|
|
|
1046
1047
|
})
|
|
1047
1048
|
}), /* @__PURE__ */ h("p", {
|
|
1048
1049
|
className: "text-sm",
|
|
1049
|
-
children:
|
|
1050
|
+
children: A("auth.sso.emptyClients", "Click \"New Client\" to register an OAuth 2.0 / OIDC client application.")
|
|
1050
1051
|
})]
|
|
1051
1052
|
})]
|
|
1052
1053
|
}),
|
|
@@ -1054,7 +1055,7 @@ function y() {
|
|
|
1054
1055
|
className: "p-6 rounded-xl border border-border-subtle bg-bg-surface",
|
|
1055
1056
|
children: [/* @__PURE__ */ h("h3", {
|
|
1056
1057
|
className: "text-lg font-medium text-text-primary mb-4",
|
|
1057
|
-
children:
|
|
1058
|
+
children: A("auth.sso.preconfiguredClients", "Pre-configured Clients")
|
|
1058
1059
|
}), /* @__PURE__ */ h("div", {
|
|
1059
1060
|
className: "space-y-4",
|
|
1060
1061
|
children: /* @__PURE__ */ g("div", {
|
|
@@ -1067,12 +1068,12 @@ function y() {
|
|
|
1067
1068
|
children: "tenant-frontend"
|
|
1068
1069
|
}), /* @__PURE__ */ h("span", {
|
|
1069
1070
|
className: "px-2 py-1 rounded-full text-xs bg-status-success-bg-subtle text-status-success-text",
|
|
1070
|
-
children:
|
|
1071
|
+
children: A("auth.sso.active", "Active")
|
|
1071
1072
|
})]
|
|
1072
1073
|
}),
|
|
1073
1074
|
/* @__PURE__ */ h("p", {
|
|
1074
1075
|
className: "text-sm text-text-secondary",
|
|
1075
|
-
children:
|
|
1076
|
+
children: A("auth.sso.preconfigClientDesc", "Default frontend client for tenant authentication")
|
|
1076
1077
|
}),
|
|
1077
1078
|
/* @__PURE__ */ g("div", {
|
|
1078
1079
|
className: "mt-2 flex flex-wrap gap-2",
|
|
@@ -1087,7 +1088,7 @@ function y() {
|
|
|
1087
1088
|
}),
|
|
1088
1089
|
/* @__PURE__ */ h("span", {
|
|
1089
1090
|
className: "px-2 py-0.5 rounded bg-bg-sunken text-xs text-text-primary",
|
|
1090
|
-
children:
|
|
1091
|
+
children: A("auth.sso.pkceRequired", "PKCE required")
|
|
1091
1092
|
})
|
|
1092
1093
|
]
|
|
1093
1094
|
})
|
|
@@ -1097,17 +1098,17 @@ function y() {
|
|
|
1097
1098
|
})
|
|
1098
1099
|
]
|
|
1099
1100
|
}),
|
|
1100
|
-
!
|
|
1101
|
+
!w && j === "test" && /* @__PURE__ */ g("div", {
|
|
1101
1102
|
className: "space-y-6",
|
|
1102
1103
|
children: [
|
|
1103
1104
|
/* @__PURE__ */ g("div", {
|
|
1104
1105
|
className: "p-4 rounded-xl bg-status-warning-bg-subtle border border-status-warning-border",
|
|
1105
1106
|
children: [/* @__PURE__ */ h("h3", {
|
|
1106
1107
|
className: "font-medium text-status-warning-text mb-2",
|
|
1107
|
-
children:
|
|
1108
|
+
children: A("auth.sso.testLoginTitle", "Test SSO Login")
|
|
1108
1109
|
}), /* @__PURE__ */ h("p", {
|
|
1109
1110
|
className: "text-sm text-status-warning-text",
|
|
1110
|
-
children:
|
|
1111
|
+
children: A("auth.sso.testLoginDesc", "Use this section to test your SSO configuration before rolling it out to users. Make sure your IdP is properly configured with the SP metadata above.")
|
|
1111
1112
|
})]
|
|
1112
1113
|
}),
|
|
1113
1114
|
/* @__PURE__ */ g("div", {
|
|
@@ -1115,15 +1116,15 @@ function y() {
|
|
|
1115
1116
|
children: [
|
|
1116
1117
|
/* @__PURE__ */ h("h3", {
|
|
1117
1118
|
className: "text-lg font-medium text-text-primary mb-4",
|
|
1118
|
-
children:
|
|
1119
|
+
children: A("auth.sso.spInitiatedTest", "SP-Initiated Login Test")
|
|
1119
1120
|
}),
|
|
1120
1121
|
/* @__PURE__ */ h("p", {
|
|
1121
1122
|
className: "text-sm text-text-secondary mb-4",
|
|
1122
|
-
children:
|
|
1123
|
+
children: A("auth.sso.spInitiatedTestDesc", "Click the button below to initiate an SSO login flow. You will be redirected to your IdP to authenticate.")
|
|
1123
1124
|
}),
|
|
1124
|
-
|
|
1125
|
+
S && S.enabled ? /* @__PURE__ */ g("a", {
|
|
1125
1126
|
href: `${window.location.origin}/auth/sso/login`,
|
|
1126
|
-
className: "inline-flex items-center gap-2 px-6 py-3 rounded-xl bg-
|
|
1127
|
+
className: "inline-flex items-center gap-2 px-6 py-3 rounded-xl bg-status-success-bg text-white font-medium shadow-sm hover:opacity-90 transition-all duration-200",
|
|
1127
1128
|
children: [/* @__PURE__ */ h("svg", {
|
|
1128
1129
|
className: "w-5 h-5",
|
|
1129
1130
|
fill: "none",
|
|
@@ -1135,10 +1136,10 @@ function y() {
|
|
|
1135
1136
|
strokeWidth: 2,
|
|
1136
1137
|
d: "M11 16l-4-4m0 0l4-4m-4 4h14m-5 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h7a3 3 0 013 3v1"
|
|
1137
1138
|
})
|
|
1138
|
-
}),
|
|
1139
|
+
}), A("auth.sso.testSsoLoginButton", "Test SSO Login")]
|
|
1139
1140
|
}) : /* @__PURE__ */ h("div", {
|
|
1140
1141
|
className: "p-4 rounded-xl bg-bg-sunken/50 text-text-secondary text-sm",
|
|
1141
|
-
children:
|
|
1142
|
+
children: S ? A("auth.sso.disabledTest", "SSO is disabled. Enable it to test the login flow.") : A("auth.sso.notConfigured", "SSO is not configured. Please configure your IdP settings first.")
|
|
1142
1143
|
})
|
|
1143
1144
|
]
|
|
1144
1145
|
}),
|
|
@@ -1146,15 +1147,38 @@ function y() {
|
|
|
1146
1147
|
className: "p-6 rounded-xl border border-border-subtle bg-bg-surface",
|
|
1147
1148
|
children: [/* @__PURE__ */ h("h3", {
|
|
1148
1149
|
className: "text-lg font-medium text-text-primary mb-4",
|
|
1149
|
-
children:
|
|
1150
|
+
children: A("auth.sso.testResults", "Test Results")
|
|
1150
1151
|
}), /* @__PURE__ */ h("p", {
|
|
1151
1152
|
className: "text-sm text-text-secondary",
|
|
1152
|
-
children:
|
|
1153
|
+
children: A("auth.sso.testResultsDesc", "After testing, results will appear here. Check the browser console for detailed logs.")
|
|
1153
1154
|
})]
|
|
1154
1155
|
})
|
|
1155
1156
|
]
|
|
1156
1157
|
})
|
|
1157
1158
|
]
|
|
1159
|
+
}) : /* @__PURE__ */ h("div", {
|
|
1160
|
+
className: "max-w-5xl mx-auto p-6",
|
|
1161
|
+
children: /* @__PURE__ */ g("div", {
|
|
1162
|
+
className: "text-center py-16 border-2 border-dashed border-border-subtle rounded-xl",
|
|
1163
|
+
children: [
|
|
1164
|
+
/* @__PURE__ */ h("div", {
|
|
1165
|
+
className: "w-16 h-16 mx-auto mb-4 rounded-full bg-status-warning-bg-subtle flex items-center justify-center",
|
|
1166
|
+
children: /* @__PURE__ */ h(n, { className: "w-8 h-8 text-status-warning-text" })
|
|
1167
|
+
}),
|
|
1168
|
+
/* @__PURE__ */ h("h2", {
|
|
1169
|
+
className: "text-xl font-semibold text-text-primary mb-2",
|
|
1170
|
+
children: A("auth.sso.enterprisePlanRequired", "Enterprise Plan Required")
|
|
1171
|
+
}),
|
|
1172
|
+
/* @__PURE__ */ h("p", {
|
|
1173
|
+
className: "text-text-secondary mb-2",
|
|
1174
|
+
children: A("auth.sso.enterprisePlanRequiredDesc", "Single Sign-On (SAML / OIDC) configuration is available on the Enterprise plan.")
|
|
1175
|
+
}),
|
|
1176
|
+
/* @__PURE__ */ h("p", {
|
|
1177
|
+
className: "text-sm text-text-secondary",
|
|
1178
|
+
children: A("auth.sso.contactSales", "Contact sales to upgrade your workspace to the Enterprise plan.")
|
|
1179
|
+
})
|
|
1180
|
+
]
|
|
1181
|
+
})
|
|
1158
1182
|
}) : /* @__PURE__ */ h("div", {
|
|
1159
1183
|
className: "max-w-5xl mx-auto p-6",
|
|
1160
1184
|
children: /* @__PURE__ */ g("div", {
|
|
@@ -1166,17 +1190,17 @@ function y() {
|
|
|
1166
1190
|
}),
|
|
1167
1191
|
/* @__PURE__ */ h("h2", {
|
|
1168
1192
|
className: "text-xl font-semibold text-text-primary mb-2",
|
|
1169
|
-
children:
|
|
1193
|
+
children: A("auth.sso.adminRequired", "Admin Access Required")
|
|
1170
1194
|
}),
|
|
1171
1195
|
/* @__PURE__ */ h("p", {
|
|
1172
1196
|
className: "text-text-secondary",
|
|
1173
|
-
children:
|
|
1197
|
+
children: A("auth.sso.adminRequiredDesc", "You need administrator privileges to configure SSO settings.")
|
|
1174
1198
|
})
|
|
1175
1199
|
]
|
|
1176
1200
|
})
|
|
1177
1201
|
});
|
|
1178
1202
|
}
|
|
1179
1203
|
//#endregion
|
|
1180
|
-
export {
|
|
1204
|
+
export { b as SsoConfigPage };
|
|
1181
1205
|
|
|
1182
1206
|
//# sourceMappingURL=SsoConfigPage.js.map
|