@keycloak/keycloak-admin-ui 26.5.7 → 26.6.0
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/lib/.vite/manifest.json +40 -40
- package/lib/{AddJWTAuthorizationGrant-B9fNafs-.js → AddJWTAuthorizationGrant-CeMENUIM.js} +19 -19
- package/lib/{AddJWTAuthorizationGrant-B9fNafs-.js.map → AddJWTAuthorizationGrant-CeMENUIM.js.map} +1 -1
- package/lib/{AddKubernetesConnect-_-fIYkCu.js → AddKubernetesConnect-0RUT9aV2.js} +13 -13
- package/lib/{AddKubernetesConnect-_-fIYkCu.js.map → AddKubernetesConnect-0RUT9aV2.js.map} +1 -1
- package/lib/{AddOAuth2-GWdhXpZu.js → AddOAuth2-Cw67bzVu.js} +12 -12
- package/lib/{AddOAuth2-GWdhXpZu.js.map → AddOAuth2-Cw67bzVu.js.map} +1 -1
- package/lib/{AddSpiffeConnect-CEycf6Um.js → AddSpiffeConnect-Cd9x7mR2.js} +9 -9
- package/lib/{AddSpiffeConnect-CEycf6Um.js.map → AddSpiffeConnect-Cd9x7mR2.js.map} +1 -1
- package/lib/{CreateFlow-C1gSi1GV.js → CreateFlow-9cA71I0U.js} +10 -10
- package/lib/{CreateFlow-C1gSi1GV.js.map → CreateFlow-9cA71I0U.js.map} +1 -1
- package/lib/DetailOrganization-C14l_h62.js +204 -0
- package/lib/DetailOrganization-C14l_h62.js.map +1 -0
- package/lib/{ExecutorForm-D3r69dqU.js → ExecutorForm-BwTQyA36.js} +17 -17
- package/lib/{ExecutorForm-D3r69dqU.js.map → ExecutorForm-BwTQyA36.js.map} +1 -1
- package/lib/{FlowDetails-DNNCBfY5.js → FlowDetails-BpGnLs_D.js} +1998 -2039
- package/lib/FlowDetails-BpGnLs_D.js.map +1 -0
- package/lib/NewOrganization-SUmXcFih.js +36 -0
- package/lib/{NewOrganization-KSp9gXMo.js.map → NewOrganization-SUmXcFih.js.map} +1 -1
- package/lib/{PermissionConfigurationDetails-LVkEXehk.js → PermissionConfigurationDetails-B7AeRfGJ.js} +118 -118
- package/lib/{PermissionConfigurationDetails-LVkEXehk.js.map → PermissionConfigurationDetails-B7AeRfGJ.js.map} +1 -1
- package/lib/{PermissionDetails-DlPJ8m6r.js → PermissionDetails-CY6ytovN.js} +79 -79
- package/lib/{PermissionDetails-DlPJ8m6r.js.map → PermissionDetails-CY6ytovN.js.map} +1 -1
- package/lib/{RealmSection-BKt0CL1J.js → RealmSection-CMquQhw3.js} +26 -26
- package/lib/{RealmSection-BKt0CL1J.js.map → RealmSection-CMquQhw3.js.map} +1 -1
- package/lib/{ResourceDetails-CV230nyS.js → ResourceDetails-BsRxSUu-.js} +36 -36
- package/lib/ResourceDetails-BsRxSUu-.js.map +1 -0
- package/lib/{ScopeDetails-BleAAOMS.js → ScopeDetails-puMEG5G1.js} +27 -27
- package/lib/{ScopeDetails-BleAAOMS.js.map → ScopeDetails-puMEG5G1.js.map} +1 -1
- package/lib/{ScopePicker-BpZ35vej.js → ScopePicker-Bc9l9PJg.js} +15 -15
- package/lib/{ScopePicker-BpZ35vej.js.map → ScopePicker-Bc9l9PJg.js.map} +1 -1
- package/lib/WorkflowDetailForm-B-cQjnC9.js +147 -0
- package/lib/WorkflowDetailForm-B-cQjnC9.js.map +1 -0
- package/lib/{WorkflowsSection-C6tPZTDa.js → WorkflowsSection-BB9dHYmO.js} +20 -20
- package/lib/{WorkflowsSection-C6tPZTDa.js.map → WorkflowsSection-BB9dHYmO.js.map} +1 -1
- package/lib/client-scopes/details/oid4vciAttributes.d.ts +4 -0
- package/lib/clients/keys/Certificate.d.ts +3 -1
- package/lib/components/dynamic/MapComponent.d.ts +1 -1
- package/lib/components/key-value-form/KeyValueInput.d.ts +4 -1
- package/lib/components/realm-loa-mapping/RealmLoAMapping.d.ts +13 -0
- package/lib/components/role-mapping/queries.d.ts +1 -2
- package/lib/components/role-mapping/resource.d.ts +33 -0
- package/lib/components/view-header/ViewHeader.d.ts +2 -1
- package/lib/context/auth/admin-ui-endpoint.d.ts +1 -0
- package/lib/context/group-resource/GroupResourceContext.d.ts +9 -0
- package/lib/groups/GroupsSection.d.ts +3 -1
- package/lib/groups/MembersModal.d.ts +5 -1
- package/lib/groups/MembershipsModal.d.ts +2 -1
- package/lib/groups/routes/Groups.d.ts +3 -0
- package/lib/help-urls.d.ts +1 -0
- package/lib/i18n/constants.d.ts +1 -0
- package/lib/i18n/i18n.d.ts +0 -1
- package/lib/{index-D3mEQ9NL.js → index-iLxEY-Jz.js} +44585 -35236
- package/lib/{index-D3mEQ9NL.js.map → index-iLxEY-Jz.js.map} +1 -1
- package/lib/index.d.ts +6 -4
- package/lib/keycloak-admin-ui.css +1 -1
- package/lib/keycloak-admin-ui.js +298 -294
- package/lib/organizations/routes/EditOrganization.d.ts +1 -1
- package/lib/realm-settings/routes/ThemesTab.d.ts +1 -1
- package/lib/realm-settings/themes/BackgroundContext.d.ts +9 -0
- package/lib/realm-settings/themes/ColorControl.d.ts +8 -0
- package/lib/realm-settings/themes/DefaultColorAccordion.d.ts +7 -0
- package/lib/realm-settings/themes/FileNameDialog.d.ts +1 -1
- package/lib/realm-settings/themes/LoginPreviewWindow.d.ts +5 -0
- package/lib/realm-settings/themes/LoginThemeProperties.d.ts +63 -0
- package/lib/realm-settings/themes/PatternflyVars.d.ts +29 -8
- package/lib/realm-settings/themes/QuickTheme.d.ts +17 -0
- package/lib/realm-settings/themes/ThemeColors.d.ts +3 -3
- package/lib/realm-settings/themes/ThemesTab.d.ts +0 -6
- package/lib/realm-settings/themes/UploadJar.d.ts +1 -1
- package/lib/realm-settings/themes/fileUtils.d.ts +1 -0
- package/lib/user/UserWorkflows.d.ts +5 -0
- package/lib/user/routes/User.d.ts +1 -1
- package/lib/user/utils/user-profile.d.ts +10 -0
- package/lib/utils/useIsFeatureEnabled.d.ts +4 -1
- package/package.json +10 -9
- package/lib/DetailOrganization-CV52xkX3.js +0 -194
- package/lib/DetailOrganization-CV52xkX3.js.map +0 -1
- package/lib/FlowDetails-DNNCBfY5.js.map +0 -1
- package/lib/NewOrganization-KSp9gXMo.js +0 -36
- package/lib/ResourceDetails-CV230nyS.js.map +0 -1
- package/lib/WorkflowDetailForm-CH1O9UEB.js +0 -4938
- package/lib/WorkflowDetailForm-CH1O9UEB.js.map +0 -1
- package/lib/theme/login.css +0 -94
package/lib/.vite/manifest.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_ScopePicker-
|
|
3
|
-
"file": "ScopePicker-
|
|
2
|
+
"_ScopePicker-Bc9l9PJg.js": {
|
|
3
|
+
"file": "ScopePicker-Bc9l9PJg.js",
|
|
4
4
|
"name": "ScopePicker",
|
|
5
5
|
"imports": [
|
|
6
|
-
"_index-
|
|
6
|
+
"_index-iLxEY-Jz.js"
|
|
7
7
|
]
|
|
8
8
|
},
|
|
9
|
-
"_index-
|
|
10
|
-
"file": "index-
|
|
9
|
+
"_index-iLxEY-Jz.js": {
|
|
10
|
+
"file": "index-iLxEY-Jz.js",
|
|
11
11
|
"name": "index",
|
|
12
12
|
"dynamicImports": [
|
|
13
13
|
"src/authentication/FlowDetails.tsx",
|
|
@@ -34,85 +34,85 @@
|
|
|
34
34
|
]
|
|
35
35
|
},
|
|
36
36
|
"src/authentication/FlowDetails.tsx": {
|
|
37
|
-
"file": "FlowDetails-
|
|
37
|
+
"file": "FlowDetails-BpGnLs_D.js",
|
|
38
38
|
"name": "FlowDetails",
|
|
39
39
|
"src": "src/authentication/FlowDetails.tsx",
|
|
40
40
|
"isDynamicEntry": true,
|
|
41
41
|
"imports": [
|
|
42
|
-
"_index-
|
|
42
|
+
"_index-iLxEY-Jz.js"
|
|
43
43
|
]
|
|
44
44
|
},
|
|
45
45
|
"src/authentication/form/CreateFlow.tsx": {
|
|
46
|
-
"file": "CreateFlow-
|
|
46
|
+
"file": "CreateFlow-9cA71I0U.js",
|
|
47
47
|
"name": "CreateFlow",
|
|
48
48
|
"src": "src/authentication/form/CreateFlow.tsx",
|
|
49
49
|
"isDynamicEntry": true,
|
|
50
50
|
"imports": [
|
|
51
|
-
"_index-
|
|
51
|
+
"_index-iLxEY-Jz.js"
|
|
52
52
|
]
|
|
53
53
|
},
|
|
54
54
|
"src/clients/authorization/PermissionDetails.tsx": {
|
|
55
|
-
"file": "PermissionDetails-
|
|
55
|
+
"file": "PermissionDetails-CY6ytovN.js",
|
|
56
56
|
"name": "PermissionDetails",
|
|
57
57
|
"src": "src/clients/authorization/PermissionDetails.tsx",
|
|
58
58
|
"isDynamicEntry": true,
|
|
59
59
|
"imports": [
|
|
60
|
-
"_index-
|
|
60
|
+
"_index-iLxEY-Jz.js"
|
|
61
61
|
]
|
|
62
62
|
},
|
|
63
63
|
"src/clients/authorization/ResourceDetails.tsx": {
|
|
64
|
-
"file": "ResourceDetails-
|
|
64
|
+
"file": "ResourceDetails-BsRxSUu-.js",
|
|
65
65
|
"name": "ResourceDetails",
|
|
66
66
|
"src": "src/clients/authorization/ResourceDetails.tsx",
|
|
67
67
|
"isDynamicEntry": true,
|
|
68
68
|
"imports": [
|
|
69
|
-
"_index-
|
|
70
|
-
"_ScopePicker-
|
|
69
|
+
"_index-iLxEY-Jz.js",
|
|
70
|
+
"_ScopePicker-Bc9l9PJg.js"
|
|
71
71
|
]
|
|
72
72
|
},
|
|
73
73
|
"src/clients/authorization/ScopeDetails.tsx": {
|
|
74
|
-
"file": "ScopeDetails-
|
|
74
|
+
"file": "ScopeDetails-puMEG5G1.js",
|
|
75
75
|
"name": "ScopeDetails",
|
|
76
76
|
"src": "src/clients/authorization/ScopeDetails.tsx",
|
|
77
77
|
"isDynamicEntry": true,
|
|
78
78
|
"imports": [
|
|
79
|
-
"_index-
|
|
79
|
+
"_index-iLxEY-Jz.js"
|
|
80
80
|
]
|
|
81
81
|
},
|
|
82
82
|
"src/identity-providers/add/AddJWTAuthorizationGrant.tsx": {
|
|
83
|
-
"file": "AddJWTAuthorizationGrant-
|
|
83
|
+
"file": "AddJWTAuthorizationGrant-CeMENUIM.js",
|
|
84
84
|
"name": "AddJWTAuthorizationGrant",
|
|
85
85
|
"src": "src/identity-providers/add/AddJWTAuthorizationGrant.tsx",
|
|
86
86
|
"isDynamicEntry": true,
|
|
87
87
|
"imports": [
|
|
88
|
-
"_index-
|
|
88
|
+
"_index-iLxEY-Jz.js"
|
|
89
89
|
]
|
|
90
90
|
},
|
|
91
91
|
"src/identity-providers/add/AddKubernetesConnect.tsx": {
|
|
92
|
-
"file": "AddKubernetesConnect-
|
|
92
|
+
"file": "AddKubernetesConnect-0RUT9aV2.js",
|
|
93
93
|
"name": "AddKubernetesConnect",
|
|
94
94
|
"src": "src/identity-providers/add/AddKubernetesConnect.tsx",
|
|
95
95
|
"isDynamicEntry": true,
|
|
96
96
|
"imports": [
|
|
97
|
-
"_index-
|
|
97
|
+
"_index-iLxEY-Jz.js"
|
|
98
98
|
]
|
|
99
99
|
},
|
|
100
100
|
"src/identity-providers/add/AddOAuth2.tsx": {
|
|
101
|
-
"file": "AddOAuth2-
|
|
101
|
+
"file": "AddOAuth2-Cw67bzVu.js",
|
|
102
102
|
"name": "AddOAuth2",
|
|
103
103
|
"src": "src/identity-providers/add/AddOAuth2.tsx",
|
|
104
104
|
"isDynamicEntry": true,
|
|
105
105
|
"imports": [
|
|
106
|
-
"_index-
|
|
106
|
+
"_index-iLxEY-Jz.js"
|
|
107
107
|
]
|
|
108
108
|
},
|
|
109
109
|
"src/identity-providers/add/AddSpiffeConnect.tsx": {
|
|
110
|
-
"file": "AddSpiffeConnect-
|
|
110
|
+
"file": "AddSpiffeConnect-Cd9x7mR2.js",
|
|
111
111
|
"name": "AddSpiffeConnect",
|
|
112
112
|
"src": "src/identity-providers/add/AddSpiffeConnect.tsx",
|
|
113
113
|
"isDynamicEntry": true,
|
|
114
114
|
"imports": [
|
|
115
|
-
"_index-
|
|
115
|
+
"_index-iLxEY-Jz.js"
|
|
116
116
|
]
|
|
117
117
|
},
|
|
118
118
|
"src/index.ts": {
|
|
@@ -121,71 +121,71 @@
|
|
|
121
121
|
"src": "src/index.ts",
|
|
122
122
|
"isEntry": true,
|
|
123
123
|
"imports": [
|
|
124
|
-
"_index-
|
|
124
|
+
"_index-iLxEY-Jz.js"
|
|
125
125
|
]
|
|
126
126
|
},
|
|
127
127
|
"src/organizations/DetailOrganization.tsx": {
|
|
128
|
-
"file": "DetailOrganization-
|
|
128
|
+
"file": "DetailOrganization-C14l_h62.js",
|
|
129
129
|
"name": "DetailOrganization",
|
|
130
130
|
"src": "src/organizations/DetailOrganization.tsx",
|
|
131
131
|
"isDynamicEntry": true,
|
|
132
132
|
"imports": [
|
|
133
|
-
"_index-
|
|
133
|
+
"_index-iLxEY-Jz.js"
|
|
134
134
|
]
|
|
135
135
|
},
|
|
136
136
|
"src/organizations/NewOrganization.tsx": {
|
|
137
|
-
"file": "NewOrganization-
|
|
137
|
+
"file": "NewOrganization-SUmXcFih.js",
|
|
138
138
|
"name": "NewOrganization",
|
|
139
139
|
"src": "src/organizations/NewOrganization.tsx",
|
|
140
140
|
"isDynamicEntry": true,
|
|
141
141
|
"imports": [
|
|
142
|
-
"_index-
|
|
142
|
+
"_index-iLxEY-Jz.js"
|
|
143
143
|
]
|
|
144
144
|
},
|
|
145
145
|
"src/permissions-configuration/permission-configuration/PermissionConfigurationDetails.tsx": {
|
|
146
|
-
"file": "PermissionConfigurationDetails-
|
|
146
|
+
"file": "PermissionConfigurationDetails-B7AeRfGJ.js",
|
|
147
147
|
"name": "PermissionConfigurationDetails",
|
|
148
148
|
"src": "src/permissions-configuration/permission-configuration/PermissionConfigurationDetails.tsx",
|
|
149
149
|
"isDynamicEntry": true,
|
|
150
150
|
"imports": [
|
|
151
|
-
"_index-
|
|
152
|
-
"_ScopePicker-
|
|
151
|
+
"_index-iLxEY-Jz.js",
|
|
152
|
+
"_ScopePicker-Bc9l9PJg.js"
|
|
153
153
|
]
|
|
154
154
|
},
|
|
155
155
|
"src/realm-settings/ExecutorForm.tsx": {
|
|
156
|
-
"file": "ExecutorForm-
|
|
156
|
+
"file": "ExecutorForm-BwTQyA36.js",
|
|
157
157
|
"name": "ExecutorForm",
|
|
158
158
|
"src": "src/realm-settings/ExecutorForm.tsx",
|
|
159
159
|
"isDynamicEntry": true,
|
|
160
160
|
"imports": [
|
|
161
|
-
"_index-
|
|
161
|
+
"_index-iLxEY-Jz.js"
|
|
162
162
|
]
|
|
163
163
|
},
|
|
164
164
|
"src/realm/RealmSection.tsx": {
|
|
165
|
-
"file": "RealmSection-
|
|
165
|
+
"file": "RealmSection-CMquQhw3.js",
|
|
166
166
|
"name": "RealmSection",
|
|
167
167
|
"src": "src/realm/RealmSection.tsx",
|
|
168
168
|
"isDynamicEntry": true,
|
|
169
169
|
"imports": [
|
|
170
|
-
"_index-
|
|
170
|
+
"_index-iLxEY-Jz.js"
|
|
171
171
|
]
|
|
172
172
|
},
|
|
173
173
|
"src/workflows/WorkflowDetailForm.tsx": {
|
|
174
|
-
"file": "WorkflowDetailForm-
|
|
174
|
+
"file": "WorkflowDetailForm-B-cQjnC9.js",
|
|
175
175
|
"name": "WorkflowDetailForm",
|
|
176
176
|
"src": "src/workflows/WorkflowDetailForm.tsx",
|
|
177
177
|
"isDynamicEntry": true,
|
|
178
178
|
"imports": [
|
|
179
|
-
"_index-
|
|
179
|
+
"_index-iLxEY-Jz.js"
|
|
180
180
|
]
|
|
181
181
|
},
|
|
182
182
|
"src/workflows/WorkflowsSection.tsx": {
|
|
183
|
-
"file": "WorkflowsSection-
|
|
183
|
+
"file": "WorkflowsSection-BB9dHYmO.js",
|
|
184
184
|
"name": "WorkflowsSection",
|
|
185
185
|
"src": "src/workflows/WorkflowsSection.tsx",
|
|
186
186
|
"isDynamicEntry": true,
|
|
187
187
|
"imports": [
|
|
188
|
-
"_index-
|
|
188
|
+
"_index-iLxEY-Jz.js"
|
|
189
189
|
]
|
|
190
190
|
},
|
|
191
191
|
"style.css": {
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import { jsxs as i, Fragment as g, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { u as p, b
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import { useNavigate as
|
|
5
|
-
function
|
|
6
|
-
const { adminClient: d } = p(), { t:
|
|
2
|
+
import { u as p, b, q as f, a as A, V as P, P as S, F as C, c as I, bJ as z, A as F, B as s, bC as w, e as G, bD as J } from "./index-iLxEY-Jz.js";
|
|
3
|
+
import { useTranslation as T } from "react-i18next";
|
|
4
|
+
import { useNavigate as V, Link as j } from "react-router-dom";
|
|
5
|
+
function k() {
|
|
6
|
+
const { adminClient: d } = p(), { t: a } = T(), c = V(), r = "jwt-authorization-grant", n = b({
|
|
7
7
|
defaultValues: { alias: r, config: { allowCreate: "true" } },
|
|
8
8
|
mode: "onChange"
|
|
9
9
|
}), {
|
|
10
10
|
handleSubmit: l,
|
|
11
11
|
formState: { isDirty: m }
|
|
12
|
-
} = n, { addAlert: u, addError: h } =
|
|
13
|
-
delete
|
|
12
|
+
} = n, { addAlert: u, addError: h } = f(), { realm: o } = A(), v = async (e) => {
|
|
13
|
+
delete e.discoveryEndpoint;
|
|
14
14
|
try {
|
|
15
15
|
await d.identityProviders.create({
|
|
16
|
-
...
|
|
16
|
+
...e,
|
|
17
17
|
providerId: r
|
|
18
|
-
}), u(
|
|
19
|
-
|
|
18
|
+
}), u(a("createIdentityProviderSuccess"), G.success), c(
|
|
19
|
+
J({
|
|
20
20
|
realm: o,
|
|
21
21
|
providerId: r,
|
|
22
|
-
alias:
|
|
22
|
+
alias: e.alias,
|
|
23
23
|
tab: "settings"
|
|
24
24
|
})
|
|
25
25
|
);
|
|
@@ -28,15 +28,15 @@ function B() {
|
|
|
28
28
|
}
|
|
29
29
|
};
|
|
30
30
|
return /* @__PURE__ */ i(g, { children: [
|
|
31
|
-
/* @__PURE__ */ t(P, { titleKey:
|
|
32
|
-
/* @__PURE__ */ t(S, { variant: "light", children: /* @__PURE__ */ t(
|
|
31
|
+
/* @__PURE__ */ t(P, { titleKey: a("addJWTAuthorizationGrantProvider") }),
|
|
32
|
+
/* @__PURE__ */ t(S, { variant: "light", children: /* @__PURE__ */ t(C, { ...n, children: /* @__PURE__ */ i(
|
|
33
33
|
I,
|
|
34
34
|
{
|
|
35
35
|
role: "manage-identity-providers",
|
|
36
36
|
isHorizontal: !0,
|
|
37
37
|
onSubmit: l(v),
|
|
38
38
|
children: [
|
|
39
|
-
/* @__PURE__ */ t(
|
|
39
|
+
/* @__PURE__ */ t(z, {}),
|
|
40
40
|
/* @__PURE__ */ i(F, { children: [
|
|
41
41
|
/* @__PURE__ */ t(
|
|
42
42
|
s,
|
|
@@ -45,7 +45,7 @@ function B() {
|
|
|
45
45
|
variant: "primary",
|
|
46
46
|
type: "submit",
|
|
47
47
|
"data-testid": "createProvider",
|
|
48
|
-
children:
|
|
48
|
+
children: a("add")
|
|
49
49
|
}
|
|
50
50
|
),
|
|
51
51
|
/* @__PURE__ */ t(
|
|
@@ -53,8 +53,8 @@ function B() {
|
|
|
53
53
|
{
|
|
54
54
|
variant: "link",
|
|
55
55
|
"data-testid": "cancel",
|
|
56
|
-
component: (
|
|
57
|
-
children:
|
|
56
|
+
component: (e) => /* @__PURE__ */ t(j, { ...e, to: w({ realm: o }) }),
|
|
57
|
+
children: a("cancel")
|
|
58
58
|
}
|
|
59
59
|
)
|
|
60
60
|
] })
|
|
@@ -64,6 +64,6 @@ function B() {
|
|
|
64
64
|
] });
|
|
65
65
|
}
|
|
66
66
|
export {
|
|
67
|
-
|
|
67
|
+
k as default
|
|
68
68
|
};
|
|
69
|
-
//# sourceMappingURL=AddJWTAuthorizationGrant-
|
|
69
|
+
//# sourceMappingURL=AddJWTAuthorizationGrant-CeMENUIM.js.map
|
package/lib/{AddJWTAuthorizationGrant-B9fNafs-.js.map → AddJWTAuthorizationGrant-CeMENUIM.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddJWTAuthorizationGrant-
|
|
1
|
+
{"version":3,"file":"AddJWTAuthorizationGrant-CeMENUIM.js","sources":["../src/identity-providers/add/AddJWTAuthorizationGrant.tsx"],"sourcesContent":["import type IdentityProviderRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/identityProviderRepresentation\";\nimport {\n ActionGroup,\n AlertVariant,\n Button,\n PageSection,\n} from \"@patternfly/react-core\";\nimport { FormProvider, useForm } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { Link, useNavigate } from \"react-router-dom\";\nimport { useAdminClient } from \"../../admin-client\";\nimport { useAlerts } from \"@keycloak/keycloak-ui-shared\";\nimport { FormAccess } from \"../../components/form/FormAccess\";\nimport { ViewHeader } from \"../../components/view-header/ViewHeader\";\nimport { useRealm } from \"../../context/realm-context/RealmContext\";\nimport { toIdentityProvider } from \"../routes/IdentityProvider\";\nimport { toIdentityProviders } from \"../routes/IdentityProviders\";\nimport JWTAuthorizationGrantSettings from \"./JWTAuthorizationGrantSettings\";\ntype DiscoveryIdentityProvider = IdentityProviderRepresentation & {\n discoveryEndpoint?: string;\n};\n\nexport default function AddJWTAuthorizationGrantConnect() {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const navigate = useNavigate();\n const id = \"jwt-authorization-grant\";\n\n const form = useForm<DiscoveryIdentityProvider>({\n defaultValues: { alias: id, config: { allowCreate: \"true\" } },\n mode: \"onChange\",\n });\n const {\n handleSubmit,\n formState: { isDirty },\n } = form;\n\n const { addAlert, addError } = useAlerts();\n const { realm } = useRealm();\n\n const onSubmit = async (provider: DiscoveryIdentityProvider) => {\n delete provider.discoveryEndpoint;\n try {\n await adminClient.identityProviders.create({\n ...provider,\n providerId: id,\n });\n addAlert(t(\"createIdentityProviderSuccess\"), AlertVariant.success);\n navigate(\n toIdentityProvider({\n realm,\n providerId: id,\n alias: provider.alias!,\n tab: \"settings\",\n }),\n );\n } catch (error: any) {\n addError(\"createIdentityProviderError\", error);\n }\n };\n\n return (\n <>\n <ViewHeader titleKey={t(\"addJWTAuthorizationGrantProvider\")} />\n <PageSection variant=\"light\">\n <FormProvider {...form}>\n <FormAccess\n role=\"manage-identity-providers\"\n isHorizontal\n onSubmit={handleSubmit(onSubmit)}\n >\n <JWTAuthorizationGrantSettings />\n\n <ActionGroup>\n <Button\n isDisabled={!isDirty}\n variant=\"primary\"\n type=\"submit\"\n data-testid=\"createProvider\"\n >\n {t(\"add\")}\n </Button>\n <Button\n variant=\"link\"\n data-testid=\"cancel\"\n component={(props) => (\n <Link {...props} to={toIdentityProviders({ realm })} />\n )}\n >\n {t(\"cancel\")}\n </Button>\n </ActionGroup>\n </FormAccess>\n </FormProvider>\n </PageSection>\n </>\n );\n}\n"],"names":["AddJWTAuthorizationGrantConnect","adminClient","useAdminClient","t","useTranslation","navigate","useNavigate","id","form","useForm","handleSubmit","isDirty","addAlert","addError","useAlerts","realm","useRealm","onSubmit","provider","AlertVariant","toIdentityProvider","error","jsxs","Fragment","jsx","ViewHeader","PageSection","FormProvider","FormAccess","JWTAuthorizationGrantSettings","ActionGroup","Button","props","Link","toIdentityProviders"],"mappings":";;;;AAsBA,SAAwBA,IAAkC;AACxD,QAAM,EAAE,aAAAC,EAAA,IAAgBC,EAAA,GAElB,EAAE,GAAAC,EAAA,IAAMC,EAAA,GACRC,IAAWC,EAAA,GACXC,IAAK,2BAELC,IAAOC,EAAmC;AAAA,IAC9C,eAAe,EAAE,OAAOF,GAAI,QAAQ,EAAE,aAAa,SAAO;AAAA,IAC1D,MAAM;AAAA,EAAA,CACP,GACK;AAAA,IACJ,cAAAG;AAAA,IACA,WAAW,EAAE,SAAAC,EAAA;AAAA,EAAQ,IACnBH,GAEE,EAAE,UAAAI,GAAU,UAAAC,EAAA,IAAaC,EAAA,GACzB,EAAE,OAAAC,EAAA,IAAUC,EAAA,GAEZC,IAAW,OAAOC,MAAwC;AAC9D,WAAOA,EAAS;AAChB,QAAI;AACF,YAAMjB,EAAY,kBAAkB,OAAO;AAAA,QACzC,GAAGiB;AAAA,QACH,YAAYX;AAAA,MAAA,CACb,GACDK,EAAST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
import { jsxs as i, Fragment as y, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { u as h, b as p,
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import { useNavigate as
|
|
5
|
-
function
|
|
6
|
-
const { adminClient: d } = h(), { t: r } =
|
|
2
|
+
import { u as h, b as p, q as g, a as P, V as f, P as A, F as C, c as I, bE as S, A as F, B as o, bC as E, e as K, bD as V } from "./index-iLxEY-Jz.js";
|
|
3
|
+
import { useTranslation as k } from "react-i18next";
|
|
4
|
+
import { useNavigate as w, Link as x } from "react-router-dom";
|
|
5
|
+
function z() {
|
|
6
|
+
const { adminClient: d } = h(), { t: r } = k(), c = w(), a = "kubernetes", n = p({
|
|
7
7
|
defaultValues: { alias: a, config: { allowCreate: "true" } },
|
|
8
8
|
mode: "onChange"
|
|
9
9
|
}), { handleSubmit: l } = n, { addAlert: m, addError: u } = g(), { realm: s } = P(), v = async (t) => {
|
|
@@ -12,8 +12,8 @@ function _() {
|
|
|
12
12
|
await d.identityProviders.create({
|
|
13
13
|
...t,
|
|
14
14
|
providerId: a
|
|
15
|
-
}), m(r("createIdentityProviderSuccess"),
|
|
16
|
-
|
|
15
|
+
}), m(r("createIdentityProviderSuccess"), K.success), c(
|
|
16
|
+
V({
|
|
17
17
|
realm: s,
|
|
18
18
|
providerId: a,
|
|
19
19
|
alias: t.alias,
|
|
@@ -26,14 +26,14 @@ function _() {
|
|
|
26
26
|
};
|
|
27
27
|
return /* @__PURE__ */ i(y, { children: [
|
|
28
28
|
/* @__PURE__ */ e(f, { titleKey: r("addKubernetesProvider") }),
|
|
29
|
-
/* @__PURE__ */ e(A, { variant: "light", children: /* @__PURE__ */ e(
|
|
30
|
-
|
|
29
|
+
/* @__PURE__ */ e(A, { variant: "light", children: /* @__PURE__ */ e(C, { ...n, children: /* @__PURE__ */ i(
|
|
30
|
+
I,
|
|
31
31
|
{
|
|
32
32
|
role: "manage-identity-providers",
|
|
33
33
|
isHorizontal: !0,
|
|
34
34
|
onSubmit: l(v),
|
|
35
35
|
children: [
|
|
36
|
-
/* @__PURE__ */ e(
|
|
36
|
+
/* @__PURE__ */ e(S, {}),
|
|
37
37
|
/* @__PURE__ */ i(F, { children: [
|
|
38
38
|
/* @__PURE__ */ e(
|
|
39
39
|
o,
|
|
@@ -49,7 +49,7 @@ function _() {
|
|
|
49
49
|
{
|
|
50
50
|
variant: "link",
|
|
51
51
|
"data-testid": "cancel",
|
|
52
|
-
component: (t) => /* @__PURE__ */ e(
|
|
52
|
+
component: (t) => /* @__PURE__ */ e(x, { ...t, to: E({ realm: s }) }),
|
|
53
53
|
children: r("cancel")
|
|
54
54
|
}
|
|
55
55
|
)
|
|
@@ -60,6 +60,6 @@ function _() {
|
|
|
60
60
|
] });
|
|
61
61
|
}
|
|
62
62
|
export {
|
|
63
|
-
|
|
63
|
+
z as default
|
|
64
64
|
};
|
|
65
|
-
//# sourceMappingURL=AddKubernetesConnect-
|
|
65
|
+
//# sourceMappingURL=AddKubernetesConnect-0RUT9aV2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddKubernetesConnect-
|
|
1
|
+
{"version":3,"file":"AddKubernetesConnect-0RUT9aV2.js","sources":["../src/identity-providers/add/AddKubernetesConnect.tsx"],"sourcesContent":["import type IdentityProviderRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/identityProviderRepresentation\";\nimport {\n ActionGroup,\n AlertVariant,\n Button,\n PageSection,\n} from \"@patternfly/react-core\";\nimport { FormProvider, useForm } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { Link, useNavigate } from \"react-router-dom\";\nimport { useAdminClient } from \"../../admin-client\";\nimport { useAlerts } from \"@keycloak/keycloak-ui-shared\";\nimport { FormAccess } from \"../../components/form/FormAccess\";\nimport { ViewHeader } from \"../../components/view-header/ViewHeader\";\nimport { useRealm } from \"../../context/realm-context/RealmContext\";\nimport { toIdentityProvider } from \"../routes/IdentityProvider\";\nimport { toIdentityProviders } from \"../routes/IdentityProviders\";\nimport { KubernetesSettings } from \"./KubernetesSettings\";\n\ntype DiscoveryIdentityProvider = IdentityProviderRepresentation & {\n discoveryEndpoint?: string;\n};\n\nexport default function AddKubernetesConnect() {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const navigate = useNavigate();\n const id = \"kubernetes\";\n\n const form = useForm<DiscoveryIdentityProvider>({\n defaultValues: { alias: id, config: { allowCreate: \"true\" } },\n mode: \"onChange\",\n });\n const { handleSubmit } = form;\n\n const { addAlert, addError } = useAlerts();\n const { realm } = useRealm();\n\n const onSubmit = async (provider: DiscoveryIdentityProvider) => {\n delete provider.discoveryEndpoint;\n try {\n await adminClient.identityProviders.create({\n ...provider,\n providerId: id,\n });\n addAlert(t(\"createIdentityProviderSuccess\"), AlertVariant.success);\n navigate(\n toIdentityProvider({\n realm,\n providerId: id,\n alias: provider.alias!,\n tab: \"settings\",\n }),\n );\n } catch (error: any) {\n addError(\"createIdentityProviderError\", error);\n }\n };\n\n return (\n <>\n <ViewHeader titleKey={t(\"addKubernetesProvider\")} />\n <PageSection variant=\"light\">\n <FormProvider {...form}>\n <FormAccess\n role=\"manage-identity-providers\"\n isHorizontal\n onSubmit={handleSubmit(onSubmit)}\n >\n <KubernetesSettings />\n <ActionGroup>\n <Button\n variant=\"primary\"\n type=\"submit\"\n data-testid=\"createProvider\"\n >\n {t(\"add\")}\n </Button>\n <Button\n variant=\"link\"\n data-testid=\"cancel\"\n component={(props) => (\n <Link {...props} to={toIdentityProviders({ realm })} />\n )}\n >\n {t(\"cancel\")}\n </Button>\n </ActionGroup>\n </FormAccess>\n </FormProvider>\n </PageSection>\n </>\n );\n}\n"],"names":["AddKubernetesConnect","adminClient","useAdminClient","t","useTranslation","navigate","useNavigate","id","form","useForm","handleSubmit","addAlert","addError","useAlerts","realm","useRealm","onSubmit","provider","AlertVariant","toIdentityProvider","error","jsxs","Fragment","jsx","ViewHeader","PageSection","FormProvider","FormAccess","KubernetesSettings","ActionGroup","Button","props","Link","toId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N;AAAA,cAACO;AAAA,cAAA;AAAA,gBACC,SAAQ;AAAA,gBACR,MAAK;AAAA,gBACL,eAAY;AAAA,gBAEX,YAAE,KAAK;AAAA,cAAA;AAAA,YAAA;AAAA,YAEV,gBAAAP;AAAA,cAACO;AAAA,cAAA;AAAA,gBACC,SAAQ;AAAA,gBACR,eAAY;AAAA,gBACZ,WAAW,CAACC,MACV,gBAAAR,EAACS,GAAA,EAAM,GAAGD,GAAO,IAAIE,EAAoB,EAAE,OAAAnB,EAAA,CAAO,EAAA,CAAG;AAAA,gBAGtD,YAAE,QAAQ;AAAA,cAAA;AAAA,YAAA;AAAA,UACb,EAAA,CACF;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA,GAEJ,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { jsxs as r, Fragment as p, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { u as y, b as
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import { useNavigate as
|
|
2
|
+
import { u as y, b as I, q as f, a as g, V as P, P as C, F as A, c as S, bF as D, bG as F, bH as O, bI as V, A as x, B as o, bC as E, e as G, bD as H } from "./index-iLxEY-Jz.js";
|
|
3
|
+
import { useTranslation as j } from "react-i18next";
|
|
4
|
+
import { useNavigate as k, Link as q } from "react-router-dom";
|
|
5
5
|
function L() {
|
|
6
|
-
const { adminClient: d } = y(), { t: a } =
|
|
6
|
+
const { adminClient: d } = y(), { t: a } = j(), c = k(), i = "oauth2", n = I({
|
|
7
7
|
defaultValues: { alias: i },
|
|
8
8
|
mode: "onChange"
|
|
9
9
|
}), {
|
|
10
10
|
handleSubmit: l,
|
|
11
11
|
formState: { isDirty: m }
|
|
12
|
-
} = n, { addAlert: u, addError: v } =
|
|
12
|
+
} = n, { addAlert: u, addError: v } = f(), { realm: s } = g(), h = async (e) => {
|
|
13
13
|
delete e.discoveryEndpoint;
|
|
14
14
|
try {
|
|
15
15
|
await d.identityProviders.create({
|
|
16
16
|
...e,
|
|
17
17
|
providerId: i
|
|
18
|
-
}), u(a("createIdentityProviderSuccess"),
|
|
19
|
-
|
|
18
|
+
}), u(a("createIdentityProviderSuccess"), G.success), c(
|
|
19
|
+
H({
|
|
20
20
|
realm: s,
|
|
21
21
|
providerId: i,
|
|
22
22
|
alias: e.alias,
|
|
@@ -29,7 +29,7 @@ function L() {
|
|
|
29
29
|
};
|
|
30
30
|
return /* @__PURE__ */ r(p, { children: [
|
|
31
31
|
/* @__PURE__ */ t(P, { titleKey: a("addOAuth2Provider") }),
|
|
32
|
-
/* @__PURE__ */ t(
|
|
32
|
+
/* @__PURE__ */ t(C, { variant: "light", children: /* @__PURE__ */ t(A, { ...n, children: /* @__PURE__ */ r(
|
|
33
33
|
S,
|
|
34
34
|
{
|
|
35
35
|
role: "manage-identity-providers",
|
|
@@ -39,8 +39,8 @@ function L() {
|
|
|
39
39
|
/* @__PURE__ */ t(D, {}),
|
|
40
40
|
/* @__PURE__ */ t(F, { isOIDC: !1 }),
|
|
41
41
|
/* @__PURE__ */ t(O, {}),
|
|
42
|
-
/* @__PURE__ */ t(
|
|
43
|
-
/* @__PURE__ */ r(
|
|
42
|
+
/* @__PURE__ */ t(V, {}),
|
|
43
|
+
/* @__PURE__ */ r(x, { children: [
|
|
44
44
|
/* @__PURE__ */ t(
|
|
45
45
|
o,
|
|
46
46
|
{
|
|
@@ -56,7 +56,7 @@ function L() {
|
|
|
56
56
|
{
|
|
57
57
|
variant: "link",
|
|
58
58
|
"data-testid": "cancel",
|
|
59
|
-
component: (e) => /* @__PURE__ */ t(
|
|
59
|
+
component: (e) => /* @__PURE__ */ t(q, { ...e, to: E({ realm: s }) }),
|
|
60
60
|
children: a("cancel")
|
|
61
61
|
}
|
|
62
62
|
)
|
|
@@ -69,4 +69,4 @@ function L() {
|
|
|
69
69
|
export {
|
|
70
70
|
L as default
|
|
71
71
|
};
|
|
72
|
-
//# sourceMappingURL=AddOAuth2-
|
|
72
|
+
//# sourceMappingURL=AddOAuth2-Cw67bzVu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddOAuth2-
|
|
1
|
+
{"version":3,"file":"AddOAuth2-Cw67bzVu.js","sources":["../src/identity-providers/add/AddOAuth2.tsx"],"sourcesContent":["import type IdentityProviderRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/identityProviderRepresentation\";\nimport {\n ActionGroup,\n AlertVariant,\n Button,\n PageSection,\n} from \"@patternfly/react-core\";\nimport { FormProvider, useForm } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { Link, useNavigate } from \"react-router-dom\";\nimport { useAdminClient } from \"../../admin-client\";\nimport { useAlerts } from \"@keycloak/keycloak-ui-shared\";\nimport { FormAccess } from \"../../components/form/FormAccess\";\nimport { ViewHeader } from \"../../components/view-header/ViewHeader\";\nimport { useRealm } from \"../../context/realm-context/RealmContext\";\nimport { toIdentityProvider } from \"../routes/IdentityProvider\";\nimport { toIdentityProviders } from \"../routes/IdentityProviders\";\nimport { OIDCAuthentication } from \"./OIDCAuthentication\";\nimport { OIDCGeneralSettings } from \"./OIDCGeneralSettings\";\nimport { OpenIdConnectSettings } from \"./OpenIdConnectSettings\";\nimport { UserProfileClaimsSettings } from \"./OAuth2UserProfileClaimsSettings\";\n\ntype DiscoveryIdentity = IdentityProviderRepresentation & {\n discoveryEndpoint?: string;\n};\n\nexport default function AddOpenIdConnect() {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const navigate = useNavigate();\n const id = `oauth2`;\n\n const form = useForm<IdentityProviderRepresentation>({\n defaultValues: { alias: id },\n mode: \"onChange\",\n });\n const {\n handleSubmit,\n formState: { isDirty },\n } = form;\n\n const { addAlert, addError } = useAlerts();\n const { realm } = useRealm();\n\n const onSubmit = async (provider: DiscoveryIdentity) => {\n delete provider.discoveryEndpoint;\n try {\n await adminClient.identityProviders.create({\n ...provider,\n providerId: id,\n });\n addAlert(t(\"createIdentityProviderSuccess\"), AlertVariant.success);\n navigate(\n toIdentityProvider({\n realm,\n providerId: id,\n alias: provider.alias!,\n tab: \"settings\",\n }),\n );\n } catch (error) {\n addError(\"createIdentityProviderError\", error);\n }\n };\n\n return (\n <>\n <ViewHeader titleKey={t(\"addOAuth2Provider\")} />\n <PageSection variant=\"light\">\n <FormProvider {...form}>\n <FormAccess\n role=\"manage-identity-providers\"\n isHorizontal\n onSubmit={handleSubmit(onSubmit)}\n >\n <OIDCGeneralSettings />\n <OpenIdConnectSettings isOIDC={false} />\n <OIDCAuthentication />\n <UserProfileClaimsSettings />\n <ActionGroup>\n <Button\n isDisabled={!isDirty}\n variant=\"primary\"\n type=\"submit\"\n data-testid=\"createProvider\"\n >\n {t(\"add\")}\n </Button>\n <Button\n variant=\"link\"\n data-testid=\"cancel\"\n component={(props) => (\n <Link {...props} to={toIdentityProviders({ realm })} />\n )}\n >\n {t(\"cancel\")}\n </Button>\n </ActionGroup>\n </FormAccess>\n </FormProvider>\n </PageSection>\n </>\n );\n}\n"],"names":["AddOpenIdConnect","adminClient","useAdminClient","t","useTranslation","navigate","useNavigate","id","form","useForm","handleSubmit","isDirty","addAlert","addError","useAlerts","realm","useRealm","onSubmit","provider","AlertVariant","toIdentityProvider","error","jsxs","Fragment","jsx","ViewHeader","PageSection","FormProvider","FormAccess","OIDCGeneralSettings","OpenIdConnectSettings","OIDCAuthentication","UserProfileClaimsSettings","ActionGroup","Button","props","Link","toIdentityProviders"],"mappings":";;;;AA0BA,SAAwBA,IAAmB;AACzC,QAAM,EAAE,aAAAC,EAAA,IAAgBC,EAAA,GAElB,EAAE,GAAAC,EAAA,IAAMC,EAAA,GACRC,IAAWC,EAAA,GACXC,IAAK,UAELC,IAAOC,EAAwC;AAAA,IACnD,eAAe,EAAE,OAAOF,EAAA;AAAA,IACxB,MAAM;AAAA,EAAA,CACP,GACK;AAAA,IACJ,cAAAG;AAAA,IACA,WAAW,EAAE,SAAAC,EAAA;AAAA,EAAQ,IACnBH,GAEE,EAA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AAAA,gBACC,SAAQ;AAAA,gBACR,eAAY;AAAA,gBACZ,WAAW,CAACC,MACV,gBAAAX,EAACY,GAAA,EAAM,GAAGD,GAAO,IAAIE,EAAoB,EAAE,OAAAtB,EAAA,CAAO,EAAA,CAAG;AAAA,gBAGtD,YAAE,QAAQ;AAAA,cAAA;AAAA,YAAA;AAAA,UACb,EAAA,CACF;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA,GAEJ,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as i, Fragment as y, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { u as h, b,
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import { useNavigate as
|
|
2
|
+
import { u as h, b, q as g, a as P, V as S, P as A, F as C, c as I, bB as F, A as V, B as o, bC as w, e as x, bD as B } from "./index-iLxEY-Jz.js";
|
|
3
|
+
import { useTranslation as D } from "react-i18next";
|
|
4
|
+
import { useNavigate as E, Link as j } from "react-router-dom";
|
|
5
5
|
function G() {
|
|
6
|
-
const { adminClient: d } = h(), { t: a } =
|
|
6
|
+
const { adminClient: d } = h(), { t: a } = D(), c = E(), r = "spiffe", n = b({
|
|
7
7
|
defaultValues: { alias: r, config: { allowCreate: "true" } },
|
|
8
8
|
mode: "onChange"
|
|
9
9
|
}), {
|
|
@@ -16,7 +16,7 @@ function G() {
|
|
|
16
16
|
...t,
|
|
17
17
|
providerId: r
|
|
18
18
|
}), u(a("createIdentityProviderSuccess"), x.success), c(
|
|
19
|
-
|
|
19
|
+
B({
|
|
20
20
|
realm: s,
|
|
21
21
|
providerId: r,
|
|
22
22
|
alias: t.alias,
|
|
@@ -29,8 +29,8 @@ function G() {
|
|
|
29
29
|
};
|
|
30
30
|
return /* @__PURE__ */ i(y, { children: [
|
|
31
31
|
/* @__PURE__ */ e(S, { titleKey: a("addSpiffeProvider") }),
|
|
32
|
-
/* @__PURE__ */ e(A, { variant: "light", children: /* @__PURE__ */ e(
|
|
33
|
-
|
|
32
|
+
/* @__PURE__ */ e(A, { variant: "light", children: /* @__PURE__ */ e(C, { ...n, children: /* @__PURE__ */ i(
|
|
33
|
+
I,
|
|
34
34
|
{
|
|
35
35
|
role: "manage-identity-providers",
|
|
36
36
|
isHorizontal: !0,
|
|
@@ -53,7 +53,7 @@ function G() {
|
|
|
53
53
|
{
|
|
54
54
|
variant: "link",
|
|
55
55
|
"data-testid": "cancel",
|
|
56
|
-
component: (t) => /* @__PURE__ */ e(
|
|
56
|
+
component: (t) => /* @__PURE__ */ e(j, { ...t, to: w({ realm: s }) }),
|
|
57
57
|
children: a("cancel")
|
|
58
58
|
}
|
|
59
59
|
)
|
|
@@ -66,4 +66,4 @@ function G() {
|
|
|
66
66
|
export {
|
|
67
67
|
G as default
|
|
68
68
|
};
|
|
69
|
-
//# sourceMappingURL=AddSpiffeConnect-
|
|
69
|
+
//# sourceMappingURL=AddSpiffeConnect-Cd9x7mR2.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddSpiffeConnect-
|
|
1
|
+
{"version":3,"file":"AddSpiffeConnect-Cd9x7mR2.js","sources":["../src/identity-providers/add/AddSpiffeConnect.tsx"],"sourcesContent":["import type IdentityProviderRepresentation from \"@keycloak/keycloak-admin-client/lib/defs/identityProviderRepresentation\";\nimport {\n ActionGroup,\n AlertVariant,\n Button,\n PageSection,\n} from \"@patternfly/react-core\";\nimport { FormProvider, useForm } from \"react-hook-form\";\nimport { useTranslation } from \"react-i18next\";\nimport { Link, useNavigate } from \"react-router-dom\";\nimport { useAdminClient } from \"../../admin-client\";\nimport { useAlerts } from \"@keycloak/keycloak-ui-shared\";\nimport { FormAccess } from \"../../components/form/FormAccess\";\nimport { ViewHeader } from \"../../components/view-header/ViewHeader\";\nimport { useRealm } from \"../../context/realm-context/RealmContext\";\nimport { toIdentityProvider } from \"../routes/IdentityProvider\";\nimport { toIdentityProviders } from \"../routes/IdentityProviders\";\nimport { SpiffeSettings } from \"./SpiffeSettings\";\n\ntype DiscoveryIdentityProvider = IdentityProviderRepresentation & {\n discoveryEndpoint?: string;\n};\n\nexport default function AddSamlConnect() {\n const { adminClient } = useAdminClient();\n\n const { t } = useTranslation();\n const navigate = useNavigate();\n const id = \"spiffe\";\n\n const form = useForm<DiscoveryIdentityProvider>({\n defaultValues: { alias: id, config: { allowCreate: \"true\" } },\n mode: \"onChange\",\n });\n const {\n handleSubmit,\n formState: { isDirty },\n } = form;\n\n const { addAlert, addError } = useAlerts();\n const { realm } = useRealm();\n\n const onSubmit = async (provider: DiscoveryIdentityProvider) => {\n delete provider.discoveryEndpoint;\n try {\n await adminClient.identityProviders.create({\n ...provider,\n providerId: id,\n });\n addAlert(t(\"createIdentityProviderSuccess\"), AlertVariant.success);\n navigate(\n toIdentityProvider({\n realm,\n providerId: id,\n alias: provider.alias!,\n tab: \"settings\",\n }),\n );\n } catch (error: any) {\n addError(\"createIdentityProviderError\", error);\n }\n };\n\n return (\n <>\n <ViewHeader titleKey={t(\"addSpiffeProvider\")} />\n <PageSection variant=\"light\">\n <FormProvider {...form}>\n <FormAccess\n role=\"manage-identity-providers\"\n isHorizontal\n onSubmit={handleSubmit(onSubmit)}\n >\n <SpiffeSettings />\n <ActionGroup>\n <Button\n isDisabled={!isDirty}\n variant=\"primary\"\n type=\"submit\"\n data-testid=\"createProvider\"\n >\n {t(\"add\")}\n </Button>\n <Button\n variant=\"link\"\n data-testid=\"cancel\"\n component={(props) => (\n <Link {...props} to={toIdentityProviders({ realm })} />\n )}\n >\n {t(\"cancel\")}\n </Button>\n </ActionGroup>\n </FormAccess>\n </FormProvider>\n </PageSection>\n </>\n );\n}\n"],"names":["AddSamlConnect","adminClient","useAdminClient","t","useTranslation","navigate","useNavigate","id","form","useForm","handleSubmit","isDirty","addAlert","addError","useAlerts","realm","useRealm","onSubmit","provider","AlertVariant","toIdentityProvider","error","jsxs","Fragment","jsx","ViewHeader","PageSection","FormProvider","FormAccess","SpiffeSettings","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