@keycloak/keycloak-admin-ui 26.7.5 → 26.8.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/README.md +10 -0
- package/lib/.vite/manifest.json +52 -42
- package/lib/{AddDefaultTrust-BvsWwMDh.js → AddDefaultTrust-0TzkSSVz.js} +8 -8
- package/lib/{AddDefaultTrust-BvsWwMDh.js.map → AddDefaultTrust-0TzkSSVz.js.map} +1 -1
- package/lib/{AddJWTAuthorizationGrant-ByBPPwyK.js → AddJWTAuthorizationGrant-BBVNGscZ.js} +12 -12
- package/lib/{AddJWTAuthorizationGrant-ByBPPwyK.js.map → AddJWTAuthorizationGrant-BBVNGscZ.js.map} +1 -1
- package/lib/{AddKubernetesConnect-D4xTogVo.js → AddKubernetesConnect-D_HJWqhs.js} +14 -11
- package/lib/AddKubernetesConnect-D_HJWqhs.js.map +1 -0
- package/lib/{AddOAuth2-BDmTZ-YA.js → AddOAuth2-BiNgjhyO.js} +13 -13
- package/lib/{AddOAuth2-BDmTZ-YA.js.map → AddOAuth2-BiNgjhyO.js.map} +1 -1
- package/lib/AddOid4Vp-gKawBcrP.js +73 -0
- package/lib/AddOid4Vp-gKawBcrP.js.map +1 -0
- package/lib/{AddSpiffeConnect-B6_E1i6Z.js → AddSpiffeConnect-BmHbvLbU.js} +8 -8
- package/lib/{AddSpiffeConnect-B6_E1i6Z.js.map → AddSpiffeConnect-BmHbvLbU.js.map} +1 -1
- package/lib/{CreateFlow-C5QWzOsy.js → CreateFlow-9Jjjw5b9.js} +2 -2
- package/lib/{CreateFlow-C5QWzOsy.js.map → CreateFlow-9Jjjw5b9.js.map} +1 -1
- package/lib/DetailOrganization-DZcO3bbq.js +420 -0
- package/lib/DetailOrganization-DZcO3bbq.js.map +1 -0
- package/lib/{ExecutorForm-n3e9Qvrl.js → ExecutorForm-BrHBEQVA.js} +23 -23
- package/lib/{ExecutorForm-n3e9Qvrl.js.map → ExecutorForm-BrHBEQVA.js.map} +1 -1
- package/lib/{FlowDetails-CnVZXaRP.js → FlowDetails-FqkRF9Fk.js} +243 -226
- package/lib/{FlowDetails-CnVZXaRP.js.map → FlowDetails-FqkRF9Fk.js.map} +1 -1
- package/lib/{NewOrganization-D4X_bhyD.js → NewOrganization-mwmhTgBv.js} +13 -13
- package/lib/NewOrganization-mwmhTgBv.js.map +1 -0
- package/lib/{PermissionConfigurationDetails-UjUwrvYu.js → PermissionConfigurationDetails-BWUvLMh4.js} +92 -91
- package/lib/PermissionConfigurationDetails-BWUvLMh4.js.map +1 -0
- package/lib/PermissionDetails-BkVFczt9.js +437 -0
- package/lib/PermissionDetails-BkVFczt9.js.map +1 -0
- package/lib/{RealmSection-BTCX9rHA.js → RealmSection-DJ8T80Z6.js} +26 -26
- package/lib/{RealmSection-BTCX9rHA.js.map → RealmSection-DJ8T80Z6.js.map} +1 -1
- package/lib/{ResourceDetails-C3cyeLL5.js → ResourceDetails-Cyb5CmVt.js} +24 -24
- package/lib/{ResourceDetails-C3cyeLL5.js.map → ResourceDetails-Cyb5CmVt.js.map} +1 -1
- package/lib/{ScopeDetails-C16qMBw-.js → ScopeDetails-BV7h3hMw.js} +17 -17
- package/lib/{ScopeDetails-C16qMBw-.js.map → ScopeDetails-BV7h3hMw.js.map} +1 -1
- package/lib/{ScopePicker-DbxK9g9R.js → ScopePicker-USX1qW3k.js} +18 -18
- package/lib/{ScopePicker-DbxK9g9R.js.map → ScopePicker-USX1qW3k.js.map} +1 -1
- package/lib/{WorkflowDetailForm-d5rClboG.js → WorkflowDetailForm-BDIXzgoJ.js} +31 -31
- package/lib/{WorkflowDetailForm-d5rClboG.js.map → WorkflowDetailForm-BDIXzgoJ.js.map} +1 -1
- package/lib/{WorkflowsSection-DRU3QF93.js → WorkflowsSection-Htg3cqfo.js} +16 -16
- package/lib/{WorkflowsSection-DRU3QF93.js.map → WorkflowsSection-Htg3cqfo.js.map} +1 -1
- package/lib/apps/admin-ui/src/authentication/constants.d.ts +3 -1
- package/lib/apps/admin-ui/src/client-scopes/details/oid4vciAttributes.d.ts +8 -3
- package/lib/apps/admin-ui/src/clients/ssf/tabs/CreateStreamForm.d.ts +18 -0
- package/lib/apps/admin-ui/src/clients/ssf/utils.d.ts +13 -0
- package/lib/apps/admin-ui/src/components/client/ClientSelect.d.ts +3 -4
- package/lib/apps/admin-ui/src/components/client/ClientSelectModal.d.ts +8 -0
- package/lib/apps/admin-ui/src/components/group/GroupPickerDialog.d.ts +8 -2
- package/lib/apps/admin-ui/src/components/role-mapping/RoleMapping.d.ts +1 -32
- package/lib/apps/admin-ui/src/components/role-mapping/resource.d.ts +9 -1
- package/lib/apps/admin-ui/src/context/identity-provider/IdentityProviderContext.d.ts +12 -0
- package/lib/apps/admin-ui/src/identity-providers/add/AddOid4Vp.d.ts +1 -0
- package/lib/apps/admin-ui/src/identity-providers/add/IdpDomainsTab.d.ts +5 -0
- package/lib/apps/admin-ui/src/identity-providers/add/IdpOrganizationsTab.d.ts +6 -0
- package/lib/apps/admin-ui/src/identity-providers/add/Oid4VpSettings.d.ts +1 -0
- package/lib/apps/admin-ui/src/identity-providers/routes/IdentityProvider.d.ts +1 -1
- package/lib/apps/admin-ui/src/identity-providers/routes/IdentityProviderOid4Vp.d.ts +7 -0
- package/lib/apps/admin-ui/src/organizations/DomainsTab.d.ts +1 -0
- package/lib/apps/admin-ui/src/organizations/IdentityProviderSelect.d.ts +4 -1
- package/lib/apps/admin-ui/src/organizations/MembershipTypeToggle.d.ts +9 -0
- package/lib/apps/admin-ui/src/organizations/OrganizationForm.d.ts +4 -1
- package/lib/apps/admin-ui/src/organizations/routes/EditOrganization.d.ts +1 -1
- package/lib/apps/admin-ui/src/realm-settings/ssf/SsfTransmitterDisableConfirmDialog.d.ts +1 -1
- package/lib/apps/admin-ui/src/utils/useIsFeatureEnabled.d.ts +3 -1
- package/lib/{index-C-D-m0EP.js → index-DsIT2BLV.js} +23888 -22978
- package/lib/{index-C-D-m0EP.js.map → index-DsIT2BLV.js.map} +1 -1
- package/lib/keycloak-admin-ui.js +75 -75
- package/package.json +4 -4
- package/lib/AddKubernetesConnect-D4xTogVo.js.map +0 -1
- package/lib/DetailOrganization-amJJPyq-.js +0 -204
- package/lib/DetailOrganization-amJJPyq-.js.map +0 -1
- package/lib/NewOrganization-D4X_bhyD.js.map +0 -1
- package/lib/PermissionConfigurationDetails-UjUwrvYu.js.map +0 -1
- package/lib/PermissionDetails-gUH5Lf-7.js +0 -413
- package/lib/PermissionDetails-gUH5Lf-7.js.map +0 -1
package/README.md
CHANGED
|
@@ -51,6 +51,16 @@ backend: {
|
|
|
51
51
|
```
|
|
52
52
|
to the `i18next` config object.
|
|
53
53
|
|
|
54
|
+
## Playwright Test Environment
|
|
55
|
+
|
|
56
|
+
The Playwright tests under `js/apps/admin-ui/test` accept these environment variables:
|
|
57
|
+
|
|
58
|
+
- `KEYCLOAK_SERVER_URL` (default: `http://localhost:8080`)
|
|
59
|
+
- `KEYCLOAK_ADMIN_USER` and `KEYCLOAK_ADMIN_PASSWORD` (default: `admin` / `admin`)
|
|
60
|
+
- `KEYCLOAK_REQUIRE_OID4VCI=true` to fail OID4VCI tests when the server feature is missing instead of skipping them
|
|
61
|
+
|
|
62
|
+
These test-only variables are different from server bootstrap variables such as `KC_BOOTSTRAP_ADMIN_USERNAME` and `KC_BOOTSTRAP_ADMIN_PASSWORD`.
|
|
63
|
+
|
|
54
64
|
## Building
|
|
55
65
|
|
|
56
66
|
To build a library instead of an app you need to add the `LIB=true` environment variable.
|
package/lib/.vite/manifest.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_ScopePicker-
|
|
3
|
-
"file": "ScopePicker-
|
|
2
|
+
"_ScopePicker-USX1qW3k.js": {
|
|
3
|
+
"file": "ScopePicker-USX1qW3k.js",
|
|
4
4
|
"name": "ScopePicker",
|
|
5
5
|
"imports": [
|
|
6
|
-
"_index-
|
|
6
|
+
"_index-DsIT2BLV.js"
|
|
7
7
|
]
|
|
8
8
|
},
|
|
9
|
-
"_index-
|
|
10
|
-
"file": "index-
|
|
9
|
+
"_index-DsIT2BLV.js": {
|
|
10
|
+
"file": "index-DsIT2BLV.js",
|
|
11
11
|
"name": "index",
|
|
12
12
|
"dynamicImports": [
|
|
13
13
|
"src/authentication/FlowDetails.tsx",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"src/identity-providers/add/AddSpiffeConnect.tsx",
|
|
23
23
|
"src/identity-providers/add/AddKubernetesConnect.tsx",
|
|
24
24
|
"src/identity-providers/add/AddDefaultTrust.tsx",
|
|
25
|
+
"src/identity-providers/add/AddOid4Vp.tsx",
|
|
25
26
|
"src/identity-providers/add/AddOAuth2.tsx",
|
|
26
27
|
"src/identity-providers/add/AddJWTAuthorizationGrant.tsx",
|
|
27
28
|
"src/organizations/NewOrganization.tsx",
|
|
@@ -35,94 +36,103 @@
|
|
|
35
36
|
]
|
|
36
37
|
},
|
|
37
38
|
"src/authentication/FlowDetails.tsx": {
|
|
38
|
-
"file": "FlowDetails-
|
|
39
|
+
"file": "FlowDetails-FqkRF9Fk.js",
|
|
39
40
|
"name": "FlowDetails",
|
|
40
41
|
"src": "src/authentication/FlowDetails.tsx",
|
|
41
42
|
"isDynamicEntry": true,
|
|
42
43
|
"imports": [
|
|
43
|
-
"_index-
|
|
44
|
+
"_index-DsIT2BLV.js"
|
|
44
45
|
]
|
|
45
46
|
},
|
|
46
47
|
"src/authentication/form/CreateFlow.tsx": {
|
|
47
|
-
"file": "CreateFlow-
|
|
48
|
+
"file": "CreateFlow-9Jjjw5b9.js",
|
|
48
49
|
"name": "CreateFlow",
|
|
49
50
|
"src": "src/authentication/form/CreateFlow.tsx",
|
|
50
51
|
"isDynamicEntry": true,
|
|
51
52
|
"imports": [
|
|
52
|
-
"_index-
|
|
53
|
+
"_index-DsIT2BLV.js"
|
|
53
54
|
]
|
|
54
55
|
},
|
|
55
56
|
"src/clients/authorization/PermissionDetails.tsx": {
|
|
56
|
-
"file": "PermissionDetails-
|
|
57
|
+
"file": "PermissionDetails-BkVFczt9.js",
|
|
57
58
|
"name": "PermissionDetails",
|
|
58
59
|
"src": "src/clients/authorization/PermissionDetails.tsx",
|
|
59
60
|
"isDynamicEntry": true,
|
|
60
61
|
"imports": [
|
|
61
|
-
"_index-
|
|
62
|
+
"_index-DsIT2BLV.js"
|
|
62
63
|
]
|
|
63
64
|
},
|
|
64
65
|
"src/clients/authorization/ResourceDetails.tsx": {
|
|
65
|
-
"file": "ResourceDetails-
|
|
66
|
+
"file": "ResourceDetails-Cyb5CmVt.js",
|
|
66
67
|
"name": "ResourceDetails",
|
|
67
68
|
"src": "src/clients/authorization/ResourceDetails.tsx",
|
|
68
69
|
"isDynamicEntry": true,
|
|
69
70
|
"imports": [
|
|
70
|
-
"_index-
|
|
71
|
-
"_ScopePicker-
|
|
71
|
+
"_index-DsIT2BLV.js",
|
|
72
|
+
"_ScopePicker-USX1qW3k.js"
|
|
72
73
|
]
|
|
73
74
|
},
|
|
74
75
|
"src/clients/authorization/ScopeDetails.tsx": {
|
|
75
|
-
"file": "ScopeDetails-
|
|
76
|
+
"file": "ScopeDetails-BV7h3hMw.js",
|
|
76
77
|
"name": "ScopeDetails",
|
|
77
78
|
"src": "src/clients/authorization/ScopeDetails.tsx",
|
|
78
79
|
"isDynamicEntry": true,
|
|
79
80
|
"imports": [
|
|
80
|
-
"_index-
|
|
81
|
+
"_index-DsIT2BLV.js"
|
|
81
82
|
]
|
|
82
83
|
},
|
|
83
84
|
"src/identity-providers/add/AddDefaultTrust.tsx": {
|
|
84
|
-
"file": "AddDefaultTrust-
|
|
85
|
+
"file": "AddDefaultTrust-0TzkSSVz.js",
|
|
85
86
|
"name": "AddDefaultTrust",
|
|
86
87
|
"src": "src/identity-providers/add/AddDefaultTrust.tsx",
|
|
87
88
|
"isDynamicEntry": true,
|
|
88
89
|
"imports": [
|
|
89
|
-
"_index-
|
|
90
|
+
"_index-DsIT2BLV.js"
|
|
90
91
|
]
|
|
91
92
|
},
|
|
92
93
|
"src/identity-providers/add/AddJWTAuthorizationGrant.tsx": {
|
|
93
|
-
"file": "AddJWTAuthorizationGrant-
|
|
94
|
+
"file": "AddJWTAuthorizationGrant-BBVNGscZ.js",
|
|
94
95
|
"name": "AddJWTAuthorizationGrant",
|
|
95
96
|
"src": "src/identity-providers/add/AddJWTAuthorizationGrant.tsx",
|
|
96
97
|
"isDynamicEntry": true,
|
|
97
98
|
"imports": [
|
|
98
|
-
"_index-
|
|
99
|
+
"_index-DsIT2BLV.js"
|
|
99
100
|
]
|
|
100
101
|
},
|
|
101
102
|
"src/identity-providers/add/AddKubernetesConnect.tsx": {
|
|
102
|
-
"file": "AddKubernetesConnect-
|
|
103
|
+
"file": "AddKubernetesConnect-D_HJWqhs.js",
|
|
103
104
|
"name": "AddKubernetesConnect",
|
|
104
105
|
"src": "src/identity-providers/add/AddKubernetesConnect.tsx",
|
|
105
106
|
"isDynamicEntry": true,
|
|
106
107
|
"imports": [
|
|
107
|
-
"_index-
|
|
108
|
+
"_index-DsIT2BLV.js"
|
|
108
109
|
]
|
|
109
110
|
},
|
|
110
111
|
"src/identity-providers/add/AddOAuth2.tsx": {
|
|
111
|
-
"file": "AddOAuth2-
|
|
112
|
+
"file": "AddOAuth2-BiNgjhyO.js",
|
|
112
113
|
"name": "AddOAuth2",
|
|
113
114
|
"src": "src/identity-providers/add/AddOAuth2.tsx",
|
|
114
115
|
"isDynamicEntry": true,
|
|
115
116
|
"imports": [
|
|
116
|
-
"_index-
|
|
117
|
+
"_index-DsIT2BLV.js"
|
|
118
|
+
]
|
|
119
|
+
},
|
|
120
|
+
"src/identity-providers/add/AddOid4Vp.tsx": {
|
|
121
|
+
"file": "AddOid4Vp-gKawBcrP.js",
|
|
122
|
+
"name": "AddOid4Vp",
|
|
123
|
+
"src": "src/identity-providers/add/AddOid4Vp.tsx",
|
|
124
|
+
"isDynamicEntry": true,
|
|
125
|
+
"imports": [
|
|
126
|
+
"_index-DsIT2BLV.js"
|
|
117
127
|
]
|
|
118
128
|
},
|
|
119
129
|
"src/identity-providers/add/AddSpiffeConnect.tsx": {
|
|
120
|
-
"file": "AddSpiffeConnect-
|
|
130
|
+
"file": "AddSpiffeConnect-BmHbvLbU.js",
|
|
121
131
|
"name": "AddSpiffeConnect",
|
|
122
132
|
"src": "src/identity-providers/add/AddSpiffeConnect.tsx",
|
|
123
133
|
"isDynamicEntry": true,
|
|
124
134
|
"imports": [
|
|
125
|
-
"_index-
|
|
135
|
+
"_index-DsIT2BLV.js"
|
|
126
136
|
]
|
|
127
137
|
},
|
|
128
138
|
"src/index.ts": {
|
|
@@ -131,71 +141,71 @@
|
|
|
131
141
|
"src": "src/index.ts",
|
|
132
142
|
"isEntry": true,
|
|
133
143
|
"imports": [
|
|
134
|
-
"_index-
|
|
144
|
+
"_index-DsIT2BLV.js"
|
|
135
145
|
]
|
|
136
146
|
},
|
|
137
147
|
"src/organizations/DetailOrganization.tsx": {
|
|
138
|
-
"file": "DetailOrganization-
|
|
148
|
+
"file": "DetailOrganization-DZcO3bbq.js",
|
|
139
149
|
"name": "DetailOrganization",
|
|
140
150
|
"src": "src/organizations/DetailOrganization.tsx",
|
|
141
151
|
"isDynamicEntry": true,
|
|
142
152
|
"imports": [
|
|
143
|
-
"_index-
|
|
153
|
+
"_index-DsIT2BLV.js"
|
|
144
154
|
]
|
|
145
155
|
},
|
|
146
156
|
"src/organizations/NewOrganization.tsx": {
|
|
147
|
-
"file": "NewOrganization-
|
|
157
|
+
"file": "NewOrganization-mwmhTgBv.js",
|
|
148
158
|
"name": "NewOrganization",
|
|
149
159
|
"src": "src/organizations/NewOrganization.tsx",
|
|
150
160
|
"isDynamicEntry": true,
|
|
151
161
|
"imports": [
|
|
152
|
-
"_index-
|
|
162
|
+
"_index-DsIT2BLV.js"
|
|
153
163
|
]
|
|
154
164
|
},
|
|
155
165
|
"src/permissions-configuration/permission-configuration/PermissionConfigurationDetails.tsx": {
|
|
156
|
-
"file": "PermissionConfigurationDetails-
|
|
166
|
+
"file": "PermissionConfigurationDetails-BWUvLMh4.js",
|
|
157
167
|
"name": "PermissionConfigurationDetails",
|
|
158
168
|
"src": "src/permissions-configuration/permission-configuration/PermissionConfigurationDetails.tsx",
|
|
159
169
|
"isDynamicEntry": true,
|
|
160
170
|
"imports": [
|
|
161
|
-
"_index-
|
|
162
|
-
"_ScopePicker-
|
|
171
|
+
"_index-DsIT2BLV.js",
|
|
172
|
+
"_ScopePicker-USX1qW3k.js"
|
|
163
173
|
]
|
|
164
174
|
},
|
|
165
175
|
"src/realm-settings/ExecutorForm.tsx": {
|
|
166
|
-
"file": "ExecutorForm-
|
|
176
|
+
"file": "ExecutorForm-BrHBEQVA.js",
|
|
167
177
|
"name": "ExecutorForm",
|
|
168
178
|
"src": "src/realm-settings/ExecutorForm.tsx",
|
|
169
179
|
"isDynamicEntry": true,
|
|
170
180
|
"imports": [
|
|
171
|
-
"_index-
|
|
181
|
+
"_index-DsIT2BLV.js"
|
|
172
182
|
]
|
|
173
183
|
},
|
|
174
184
|
"src/realm/RealmSection.tsx": {
|
|
175
|
-
"file": "RealmSection-
|
|
185
|
+
"file": "RealmSection-DJ8T80Z6.js",
|
|
176
186
|
"name": "RealmSection",
|
|
177
187
|
"src": "src/realm/RealmSection.tsx",
|
|
178
188
|
"isDynamicEntry": true,
|
|
179
189
|
"imports": [
|
|
180
|
-
"_index-
|
|
190
|
+
"_index-DsIT2BLV.js"
|
|
181
191
|
]
|
|
182
192
|
},
|
|
183
193
|
"src/workflows/WorkflowDetailForm.tsx": {
|
|
184
|
-
"file": "WorkflowDetailForm-
|
|
194
|
+
"file": "WorkflowDetailForm-BDIXzgoJ.js",
|
|
185
195
|
"name": "WorkflowDetailForm",
|
|
186
196
|
"src": "src/workflows/WorkflowDetailForm.tsx",
|
|
187
197
|
"isDynamicEntry": true,
|
|
188
198
|
"imports": [
|
|
189
|
-
"_index-
|
|
199
|
+
"_index-DsIT2BLV.js"
|
|
190
200
|
]
|
|
191
201
|
},
|
|
192
202
|
"src/workflows/WorkflowsSection.tsx": {
|
|
193
|
-
"file": "WorkflowsSection-
|
|
203
|
+
"file": "WorkflowsSection-Htg3cqfo.js",
|
|
194
204
|
"name": "WorkflowsSection",
|
|
195
205
|
"src": "src/workflows/WorkflowsSection.tsx",
|
|
196
206
|
"isDynamicEntry": true,
|
|
197
207
|
"imports": [
|
|
198
|
-
"_index-
|
|
208
|
+
"_index-DsIT2BLV.js"
|
|
199
209
|
]
|
|
200
210
|
},
|
|
201
211
|
"style.css": {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as i, Fragment as p, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { u as h, b,
|
|
3
|
-
import { useTranslation as
|
|
2
|
+
import { u as h, b, K as P, a as g, V as I, P as A, F as S, c as F, bI as D, A as T, B as o, bF as V, e as x, bG as C } from "./index-DsIT2BLV.js";
|
|
3
|
+
import { useTranslation as K } from "react-i18next";
|
|
4
4
|
import { useNavigate as j, Link as k } from "react-router-dom";
|
|
5
5
|
function H() {
|
|
6
|
-
const { adminClient: d } = h(), { t: e } =
|
|
6
|
+
const { adminClient: d } = h(), { t: e } = K(), c = j(), a = "default-trust", s = b({
|
|
7
7
|
defaultValues: { alias: a },
|
|
8
8
|
mode: "onChange"
|
|
9
9
|
}), {
|
|
@@ -28,19 +28,19 @@ function H() {
|
|
|
28
28
|
};
|
|
29
29
|
return /* @__PURE__ */ i(p, { children: [
|
|
30
30
|
/* @__PURE__ */ t(
|
|
31
|
-
|
|
31
|
+
I,
|
|
32
32
|
{
|
|
33
33
|
titleKey: e("addIdentityProvider", { provider: "Default Trust" })
|
|
34
34
|
}
|
|
35
35
|
),
|
|
36
|
-
/* @__PURE__ */ t(
|
|
37
|
-
|
|
36
|
+
/* @__PURE__ */ t(A, { variant: "light", children: /* @__PURE__ */ t(S, { ...s, children: /* @__PURE__ */ i(
|
|
37
|
+
F,
|
|
38
38
|
{
|
|
39
39
|
role: "manage-identity-providers",
|
|
40
40
|
isHorizontal: !0,
|
|
41
41
|
onSubmit: l(f),
|
|
42
42
|
children: [
|
|
43
|
-
/* @__PURE__ */ t(
|
|
43
|
+
/* @__PURE__ */ t(D, {}),
|
|
44
44
|
/* @__PURE__ */ i(T, { children: [
|
|
45
45
|
/* @__PURE__ */ t(
|
|
46
46
|
o,
|
|
@@ -70,4 +70,4 @@ function H() {
|
|
|
70
70
|
export {
|
|
71
71
|
H as default
|
|
72
72
|
};
|
|
73
|
-
//# sourceMappingURL=AddDefaultTrust-
|
|
73
|
+
//# sourceMappingURL=AddDefaultTrust-0TzkSSVz.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddDefaultTrust-
|
|
1
|
+
{"version":3,"file":"AddDefaultTrust-0TzkSSVz.js","sources":["../src/identity-providers/add/AddDefaultTrust.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 DefaultTrustSettings from \"./DefaultTrustSettings\";\n\nexport default function AddDefaultTrust() {\n const { adminClient } = useAdminClient();\n const { t } = useTranslation();\n const navigate = useNavigate();\n const id = \"default-trust\";\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: IdentityProviderRepresentation) => {\n try {\n await adminClient.identityProviders.create({\n ...provider,\n providerId: id,\n });\n addAlert(t(\"createIdentityProviderSuccess\"), AlertVariant.success);\n void 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\n titleKey={t(\"addIdentityProvider\", { provider: \"Default Trust\" })}\n />\n <PageSection variant=\"light\">\n <FormProvider {...form}>\n <FormAccess\n role=\"manage-identity-providers\"\n isHorizontal\n onSubmit={handleSubmit(onSubmit)}\n >\n <DefaultTrustSettings />\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":["AddDefaultTrust","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","DefaultTrustSettings","ActionGroup","Button","props","Link","toIdentityProviders"],"mappings":";;;;AAmBA,SAAwBA,IAAkB;AACxC,QAAM,EAAE,aAAAC,EAAA,IAAgBC,EAAA,GAClB,EAAE,GAAAC,EAAA,IAAMC,EAAA,GACRC,IAAWC,EAAA,GACXC,IAAK,iBAELC,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,EAAE,UAAAI,GAAU,UAAAC,EAAA,IAAaC,EAAA,GACzB,EAAE,OAAAC,EAAA,IAAUC,EAAA,GAEZC,IAAW,OAAOC,MAA6C;AACnE,QAAI;AACF,YAAMjB,EAAY,kBAAkB,OAAO;AAAA,QACzC,GAAGiB;AAAA,QACH,YAAYX;AAAA,MAAA,CACb,GACDK,EAAST,EAAE,+BAA+B,GAAGgB,EAAa,OAAO,GAC5Dd;AAAA,QACHe,EAAmB;AAAA,UACjB,OAAAL;AAAA,UACA,YAAYR;AAAA,UACZ,OAAOW,EAAS;AAAA,UAChB,KAAK;AAAA,QAAA,CACN;AAAA,MAAA;AAAA,IAEL,SAASG,GAAO;AACd,MAAAR,EAAS,+BAA+BQ,CAAK;AAAA,IAC/C;AAAA,EACF;AAEA,SACE,gBAAAC,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,UAAUtB,EAAE,uBAAuB,EAAE,UAAU,iBAAiB;AAAA,MAAA;AAAA,IAAA;AAAA,sBAEjEuB,GAAA,EAAY,SAAQ,SACnB,UAAA,gBAAAF,EAACG,GAAA,EAAc,GAAGnB,GAChB,UAAA,gBAAAc;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,cAAY;AAAA,QACZ,UAAUlB,EAAaO,CAAQ;AAAA,QAE/B,UAAA;AAAA,UAAA,gBAAAO,EAACK,GAAA,EAAqB;AAAA,4BAErBC,GAAA,EACC,UAAA;AAAA,YAAA,gBAAAN;AAAA,cAACO;AAAA,cAAA;AAAA,gBACC,YAAY,CAACpB;AAAA,gBACb,SAAQ;AAAA,gBACR,MAAK;AAAA,gBACL,eAAY;AAAA,gBAEX,YAAE,KAAK;AAAA,cAAA;AAAA,YAAA;AAAA,YAEV,gBAAAa;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,9 +1,9 @@
|
|
|
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
|
|
2
|
+
import { u as p, b, K as f, a as A, V as P, P as S, F, c as I, bO as z, A as C, B as s, bF as G, e as w, bG as T } from "./index-DsIT2BLV.js";
|
|
3
|
+
import { useTranslation as V } from "react-i18next";
|
|
4
|
+
import { useNavigate as j, Link as x } from "react-router-dom";
|
|
5
5
|
function k() {
|
|
6
|
-
const { adminClient: d } = p(), { t: a } =
|
|
6
|
+
const { adminClient: d } = p(), { t: a } = V(), c = j(), r = "jwt-authorization-grant", n = b({
|
|
7
7
|
defaultValues: { alias: r, config: { allowCreate: "true" } },
|
|
8
8
|
mode: "onChange"
|
|
9
9
|
}), {
|
|
@@ -15,8 +15,8 @@ function k() {
|
|
|
15
15
|
await d.identityProviders.create({
|
|
16
16
|
...e,
|
|
17
17
|
providerId: r
|
|
18
|
-
}), u(a("createIdentityProviderSuccess"),
|
|
19
|
-
|
|
18
|
+
}), u(a("createIdentityProviderSuccess"), w.success), c(
|
|
19
|
+
T({
|
|
20
20
|
realm: o,
|
|
21
21
|
providerId: r,
|
|
22
22
|
alias: e.alias,
|
|
@@ -29,15 +29,15 @@ function k() {
|
|
|
29
29
|
};
|
|
30
30
|
return /* @__PURE__ */ i(g, { children: [
|
|
31
31
|
/* @__PURE__ */ t(P, { titleKey: a("addJWTAuthorizationGrantProvider") }),
|
|
32
|
-
/* @__PURE__ */ t(S, { variant: "light", children: /* @__PURE__ */ t(
|
|
33
|
-
|
|
32
|
+
/* @__PURE__ */ t(S, { variant: "light", children: /* @__PURE__ */ t(F, { ...n, children: /* @__PURE__ */ i(
|
|
33
|
+
I,
|
|
34
34
|
{
|
|
35
35
|
role: "manage-identity-providers",
|
|
36
36
|
isHorizontal: !0,
|
|
37
37
|
onSubmit: l(h),
|
|
38
38
|
children: [
|
|
39
|
-
/* @__PURE__ */ t(
|
|
40
|
-
/* @__PURE__ */ i(
|
|
39
|
+
/* @__PURE__ */ t(z, {}),
|
|
40
|
+
/* @__PURE__ */ i(C, { children: [
|
|
41
41
|
/* @__PURE__ */ t(
|
|
42
42
|
s,
|
|
43
43
|
{
|
|
@@ -53,7 +53,7 @@ function k() {
|
|
|
53
53
|
{
|
|
54
54
|
variant: "link",
|
|
55
55
|
"data-testid": "cancel",
|
|
56
|
-
component: (e) => /* @__PURE__ */ t(
|
|
56
|
+
component: (e) => /* @__PURE__ */ t(x, { ...e, to: G({ realm: o }) }),
|
|
57
57
|
children: a("cancel")
|
|
58
58
|
}
|
|
59
59
|
)
|
|
@@ -66,4 +66,4 @@ function k() {
|
|
|
66
66
|
export {
|
|
67
67
|
k as default
|
|
68
68
|
};
|
|
69
|
-
//# sourceMappingURL=AddJWTAuthorizationGrant-
|
|
69
|
+
//# sourceMappingURL=AddJWTAuthorizationGrant-BBVNGscZ.js.map
|
package/lib/{AddJWTAuthorizationGrant-ByBPPwyK.js.map → AddJWTAuthorizationGrant-BBVNGscZ.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddJWTAuthorizationGrant-
|
|
1
|
+
{"version":3,"file":"AddJWTAuthorizationGrant-BBVNGscZ.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 void 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(\"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,EAAE,+BAA+B,GAAGgB,EAAa,OAAO,GAC5Dd;AAAA,QACHe,EAAmB;AAAA,UACjB,OAAAL;AAAA,UACA,YAAYR;AAAA,UACZ,OAAOW,EAAS;AAAA,UAChB,KAAK;AAAA,QAAA,CACN;AAAA,MAAA;AAAA,IAEL,SAASG,GAAO;AACd,MAAAR,EAAS,+BAA+BQ,CAAK;AAAA,IAC/C;AAAA,EACF;AAEA,SACE,gBAAAC,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC,EAACC,GAAA,EAAW,UAAUtB,EAAE,kCAAkC,EAAA,CAAG;AAAA,sBAC5DuB,GAAA,EAAY,SAAQ,SACnB,UAAA,gBAAAF,EAACG,GAAA,EAAc,GAAGnB,GAChB,UAAA,gBAAAc;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,cAAY;AAAA,QACZ,UAAUlB,EAAaO,CAAQ;AAAA,QAE/B,UAAA;AAAA,UAAA,gBAAAO,EAACK,GAAA,EAA8B;AAAA,4BAE9BC,GAAA,EACC,UAAA;AAAA,YAAA,gBAAAN;AAAA,cAACO;AAAA,cAAA;AAAA,gBACC,YAAY,CAACpB;AAAA,gBACb,SAAQ;AAAA,gBACR,MAAK;AAAA,gBACL,eAAY;AAAA,gBAEX,YAAE,KAAK;AAAA,cAAA;AAAA,YAAA;AAAA,YAEV,gBAAAa;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,10 +1,13 @@
|
|
|
1
1
|
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
|
|
2
|
+
import { u as h, b as p, K as g, a as P, V as f, P as A, F, c as I, bH as K, A as S, B as o, bF as C, e as V, bG as k } from "./index-DsIT2BLV.js";
|
|
3
|
+
import { useTranslation as w } from "react-i18next";
|
|
4
|
+
import { useNavigate as x, Link as E } from "react-router-dom";
|
|
5
5
|
function z() {
|
|
6
|
-
const { adminClient: d } = h(), { t: r } =
|
|
7
|
-
defaultValues: {
|
|
6
|
+
const { adminClient: d } = h(), { t: r } = w(), c = x(), a = "kubernetes", n = p({
|
|
7
|
+
defaultValues: {
|
|
8
|
+
alias: a,
|
|
9
|
+
config: { allowCreate: "true" }
|
|
10
|
+
},
|
|
8
11
|
mode: "onChange"
|
|
9
12
|
}), { handleSubmit: l } = n, { addAlert: m, addError: u } = g(), { realm: s } = P(), v = async (t) => {
|
|
10
13
|
delete t.discoveryEndpoint;
|
|
@@ -12,8 +15,8 @@ function z() {
|
|
|
12
15
|
await d.identityProviders.create({
|
|
13
16
|
...t,
|
|
14
17
|
providerId: a
|
|
15
|
-
}), m(r("createIdentityProviderSuccess"),
|
|
16
|
-
|
|
18
|
+
}), m(r("createIdentityProviderSuccess"), V.success), c(
|
|
19
|
+
k({
|
|
17
20
|
realm: s,
|
|
18
21
|
providerId: a,
|
|
19
22
|
alias: t.alias,
|
|
@@ -33,8 +36,8 @@ function z() {
|
|
|
33
36
|
isHorizontal: !0,
|
|
34
37
|
onSubmit: l(v),
|
|
35
38
|
children: [
|
|
36
|
-
/* @__PURE__ */ e(
|
|
37
|
-
/* @__PURE__ */ i(
|
|
39
|
+
/* @__PURE__ */ e(K, {}),
|
|
40
|
+
/* @__PURE__ */ i(S, { children: [
|
|
38
41
|
/* @__PURE__ */ e(
|
|
39
42
|
o,
|
|
40
43
|
{
|
|
@@ -49,7 +52,7 @@ function z() {
|
|
|
49
52
|
{
|
|
50
53
|
variant: "link",
|
|
51
54
|
"data-testid": "cancel",
|
|
52
|
-
component: (t) => /* @__PURE__ */ e(
|
|
55
|
+
component: (t) => /* @__PURE__ */ e(E, { ...t, to: C({ realm: s }) }),
|
|
53
56
|
children: r("cancel")
|
|
54
57
|
}
|
|
55
58
|
)
|
|
@@ -62,4 +65,4 @@ function z() {
|
|
|
62
65
|
export {
|
|
63
66
|
z as default
|
|
64
67
|
};
|
|
65
|
-
//# sourceMappingURL=AddKubernetesConnect-
|
|
68
|
+
//# sourceMappingURL=AddKubernetesConnect-D_HJWqhs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AddKubernetesConnect-D_HJWqhs.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: {\n alias: id,\n config: { allowCreate: \"true\" },\n },\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 void 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(\"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","toIdentityProviders"],"mappings":";;;;AAuBA,SAAwBA,IAAuB;AAC7C,QAAM,EAAE,aAAAC,EAAA,IAAgBC,EAAA,GAElB,EAAE,GAAAC,EAAA,IAAMC,EAAA,GACRC,IAAWC,EAAA,GACXC,IAAK,cAELC,IAAOC,EAAmC;AAAA,IAC9C,eAAe;AAAA,MACb,OAAOF;AAAA,MACP,QAAQ,EAAE,aAAa,OAAA;AAAA,IAAO;AAAA,IAEhC,MAAM;AAAA,EAAA,CACP,GACK,EAAE,cAAAG,MAAiBF,GAEnB,EAAE,UAAAG,GAAU,UAAAC,EAAA,IAAaC,EAAA,GACzB,EAAE,OAAAC,EAAA,IAAUC,EAAA,GAEZC,IAAW,OAAOC,MAAwC;AAC9D,WAAOA,EAAS;AAChB,QAAI;AACF,YAAMhB,EAAY,kBAAkB,OAAO;AAAA,QACzC,GAAGgB;AAAA,QACH,YAAYV;AAAA,MAAA,CACb,GACDI,EAASR,EAAE,+BAA+B,GAAGe,EAAa,OAAO,GAC5Db;AAAA,QACHc,EAAmB;AAAA,UACjB,OAAAL;AAAA,UACA,YAAYP;AAAA,UACZ,OAAOU,EAAS;AAAA,UAChB,KAAK;AAAA,QAAA,CACN;AAAA,MAAA;AAAA,IAEL,SAASG,GAAO;AACd,MAAAR,EAAS,+BAA+BQ,CAAK;AAAA,IAC/C;AAAA,EACF;AAEA,SACE,gBAAAC,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC,EAACC,GAAA,EAAW,UAAUrB,EAAE,uBAAuB,EAAA,CAAG;AAAA,sBACjDsB,GAAA,EAAY,SAAQ,SACnB,UAAA,gBAAAF,EAACG,GAAA,EAAc,GAAGlB,GAChB,UAAA,gBAAAa;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,cAAY;AAAA,QACZ,UAAUjB,EAAaM,CAAQ;AAAA,QAE/B,UAAA;AAAA,UAAA,gBAAAO,EAACK,GAAA,EAAmB;AAAA,4BACnBC,GAAA,EACC,UAAA;AAAA,YAAA,gBAAAN;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
|
|
5
|
-
function
|
|
6
|
-
const { adminClient: d } = y(), { t: a } =
|
|
2
|
+
import { u as y, b as f, K as g, a as I, V as P, P as A, F as C, c as S, bK as F, bL as O, bM as D, bN as K, A as V, B as o, bF as x, e as E, bG as G } from "./index-DsIT2BLV.js";
|
|
3
|
+
import { useTranslation as j } from "react-i18next";
|
|
4
|
+
import { useNavigate as k, Link as w } from "react-router-dom";
|
|
5
|
+
function z() {
|
|
6
|
+
const { adminClient: d } = y(), { t: a } = j(), c = k(), i = "oauth2", n = f({
|
|
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 } = g(), { realm: s } = I(), 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"), E.success), c(
|
|
19
|
+
G({
|
|
20
20
|
realm: s,
|
|
21
21
|
providerId: i,
|
|
22
22
|
alias: e.alias,
|
|
@@ -36,10 +36,10 @@ function J() {
|
|
|
36
36
|
isHorizontal: !0,
|
|
37
37
|
onSubmit: l(h),
|
|
38
38
|
children: [
|
|
39
|
-
/* @__PURE__ */ t(D, {}),
|
|
40
|
-
/* @__PURE__ */ t(O, { isOIDC: !1 }),
|
|
41
39
|
/* @__PURE__ */ t(F, {}),
|
|
42
|
-
/* @__PURE__ */ t(
|
|
40
|
+
/* @__PURE__ */ t(O, { isOIDC: !1 }),
|
|
41
|
+
/* @__PURE__ */ t(D, {}),
|
|
42
|
+
/* @__PURE__ */ t(K, {}),
|
|
43
43
|
/* @__PURE__ */ r(V, { children: [
|
|
44
44
|
/* @__PURE__ */ t(
|
|
45
45
|
o,
|
|
@@ -67,6 +67,6 @@ function J() {
|
|
|
67
67
|
] });
|
|
68
68
|
}
|
|
69
69
|
export {
|
|
70
|
-
|
|
70
|
+
z as default
|
|
71
71
|
};
|
|
72
|
-
//# sourceMappingURL=AddOAuth2-
|
|
72
|
+
//# sourceMappingURL=AddOAuth2-BiNgjhyO.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AddOAuth2-
|
|
1
|
+
{"version":3,"file":"AddOAuth2-BiNgjhyO.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 void 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,EAAE,UAAAI,GAAU,UAAAC,EAAA,IAAaC,EAAA,GACzB,EAAE,OAAAC,EAAA,IAAUC,EAAA,GAEZC,IAAW,OAAOC,MAAgC;AACtD,WAAOA,EAAS;AAChB,QAAI;AACF,YAAMjB,EAAY,kBAAkB,OAAO;AAAA,QACzC,GAAGiB;AAAA,QACH,YAAYX;AAAA,MAAA,CACb,GACDK,EAAST,EAAE,+BAA+B,GAAGgB,EAAa,OAAO,GAC5Dd;AAAA,QACHe,EAAmB;AAAA,UACjB,OAAAL;AAAA,UACA,YAAYR;AAAA,UACZ,OAAOW,EAAS;AAAA,UAChB,KAAK;AAAA,QAAA,CACN;AAAA,MAAA;AAAA,IAEL,SAASG,GAAO;AACd,MAAAR,EAAS,+BAA+BQ,CAAK;AAAA,IAC/C;AAAA,EACF;AAEA,SACE,gBAAAC,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC,EAACC,GAAA,EAAW,UAAUtB,EAAE,mBAAmB,EAAA,CAAG;AAAA,sBAC7CuB,GAAA,EAAY,SAAQ,SACnB,UAAA,gBAAAF,EAACG,GAAA,EAAc,GAAGnB,GAChB,UAAA,gBAAAc;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,cAAY;AAAA,QACZ,UAAUlB,EAAaO,CAAQ;AAAA,QAE/B,UAAA;AAAA,UAAA,gBAAAO,EAACK,GAAA,EAAoB;AAAA,UACrB,gBAAAL,EAACM,GAAA,EAAsB,QAAQ,GAAA,CAAO;AAAA,4BACrCC,GAAA,EAAmB;AAAA,4BACnBC,GAAA,EAA0B;AAAA,4BAC1BC,GAAA,EACC,UAAA;AAAA,YAAA,gBAAAT;AAAA,cAACU;AAAA,cAAA;AAAA,gBACC,YAAY,CAACvB;AAAA,gBACb,SAAQ;AAAA,gBACR,MAAK;AAAA,gBACL,eAAY;AAAA,gBAEX,YAAE,KAAK;AAAA,cAAA;AAAA,YAAA;AAAA,YAEV,gBAAAa;AAAA,cAACU;AAAA,cAAA;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;"}
|