keycloak-api-manager 5.0.1 → 5.0.3
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 +19 -1
- package/docs/api/attack-detection.md +42 -0
- package/docs/api/authentication-management.md +160 -0
- package/docs/api/client-policies.md +66 -0
- package/docs/api/client-scopes.md +194 -0
- package/docs/api/clients.md +450 -0
- package/docs/api/components.md +57 -0
- package/docs/api/configuration.md +466 -0
- package/docs/api/groups.md +129 -0
- package/docs/api/identity-providers.md +98 -0
- package/docs/api/organizations.md +615 -0
- package/docs/api/realms.md +277 -0
- package/docs/api/roles.md +102 -0
- package/docs/api/server-info.md +38 -0
- package/docs/api/user-profile.md +63 -0
- package/docs/api/users.md +1563 -0
- package/docs/api-reference.md +163 -0
- package/docs/architecture.md +3 -1
- package/package.json +1 -1
|
@@ -0,0 +1,277 @@
|
|
|
1
|
+
# Realms API
|
|
2
|
+
|
|
3
|
+
Full realm lifecycle and advanced realm administration.
|
|
4
|
+
|
|
5
|
+
**Namespace:** `KeycloakManager.realms`
|
|
6
|
+
|
|
7
|
+
## Sections
|
|
8
|
+
- Realm CRUD
|
|
9
|
+
- Import / Export
|
|
10
|
+
- Client registration policies and initial access tokens
|
|
11
|
+
- Default groups
|
|
12
|
+
- Events and admin events
|
|
13
|
+
- Users management permissions
|
|
14
|
+
- Keys, sessions, revocation
|
|
15
|
+
- LDAP / SMTP diagnostics
|
|
16
|
+
- Localization
|
|
17
|
+
|
|
18
|
+
## Realm CRUD
|
|
19
|
+
|
|
20
|
+
### create(realmDictionary)
|
|
21
|
+
Create a realm.
|
|
22
|
+
|
|
23
|
+
- **Required**: `realmDictionary.realm` (string)
|
|
24
|
+
- **Optional**: any Keycloak RealmRepresentation fields (`enabled`, `displayName`, `registrationAllowed`, `loginTheme`, etc.)
|
|
25
|
+
- **Returns**: Promise<void|object>
|
|
26
|
+
|
|
27
|
+
### update(filter, realmDictionary)
|
|
28
|
+
Update a realm.
|
|
29
|
+
|
|
30
|
+
- **Required**: `filter.realm` (string)
|
|
31
|
+
- **Required**: `realmDictionary` (RealmRepresentation partial)
|
|
32
|
+
- **Returns**: Promise<void>
|
|
33
|
+
|
|
34
|
+
### del(filter)
|
|
35
|
+
Delete a realm.
|
|
36
|
+
|
|
37
|
+
- **Required**: `filter.realm` (string)
|
|
38
|
+
- **Returns**: Promise<void>
|
|
39
|
+
|
|
40
|
+
### find()
|
|
41
|
+
List all realms.
|
|
42
|
+
|
|
43
|
+
- **Params**: none
|
|
44
|
+
- **Returns**: Promise<Array<RealmRepresentation>>
|
|
45
|
+
|
|
46
|
+
### findOne(filter)
|
|
47
|
+
Get one realm.
|
|
48
|
+
|
|
49
|
+
- **Required**: `filter.realm` (string)
|
|
50
|
+
- **Returns**: Promise<RealmRepresentation>
|
|
51
|
+
|
|
52
|
+
## Import / Export
|
|
53
|
+
|
|
54
|
+
### partialImport(configuration)
|
|
55
|
+
Import partial realm config.
|
|
56
|
+
|
|
57
|
+
- **Required**: `configuration.realm` (string)
|
|
58
|
+
- **Optional**: `ifResourceExists` (`FAIL` | `SKIP` | `OVERWRITE`)
|
|
59
|
+
- **Optional**: `users`, `groups`, `clients`, `roles`, `identityProviders`, etc.
|
|
60
|
+
- **Returns**: Promise<object>
|
|
61
|
+
|
|
62
|
+
### export(configuration)
|
|
63
|
+
Export realm config.
|
|
64
|
+
|
|
65
|
+
- **Required**: `configuration.realm` (string)
|
|
66
|
+
- **Optional**: `users` (`realm_file` | `skip` | `same_file`), `clients`, `groupsAndRoles`
|
|
67
|
+
- **Returns**: Promise<object>
|
|
68
|
+
|
|
69
|
+
## Client Registration / Initial Access
|
|
70
|
+
|
|
71
|
+
### getClientRegistrationPolicyProviders(configuration)
|
|
72
|
+
Get client registration policy providers.
|
|
73
|
+
|
|
74
|
+
- **Required**: `configuration.realm` (string)
|
|
75
|
+
- **Returns**: Promise<Array<object>>
|
|
76
|
+
|
|
77
|
+
### createClientsInitialAccess(realmFilter, options)
|
|
78
|
+
Create initial access token for dynamic client registration.
|
|
79
|
+
|
|
80
|
+
- **Required**: `realmFilter.realm` (string)
|
|
81
|
+
- **Optional**: `options.count` (number)
|
|
82
|
+
- **Optional**: `options.expiration` (number, seconds)
|
|
83
|
+
- **Returns**: Promise<object>
|
|
84
|
+
|
|
85
|
+
### getClientsInitialAccess(realmFilter)
|
|
86
|
+
List initial access tokens.
|
|
87
|
+
|
|
88
|
+
- **Required**: `realmFilter.realm` (string)
|
|
89
|
+
- **Returns**: Promise<Array<object>>
|
|
90
|
+
|
|
91
|
+
### delClientsInitialAccess(realmFilter)
|
|
92
|
+
Delete one initial access token.
|
|
93
|
+
|
|
94
|
+
- **Required**: `realmFilter.realm` (string)
|
|
95
|
+
- **Required**: `realmFilter.id` (string, token id)
|
|
96
|
+
- **Returns**: Promise<void>
|
|
97
|
+
|
|
98
|
+
## Default Groups
|
|
99
|
+
|
|
100
|
+
### addDefaultGroup(realmFilter)
|
|
101
|
+
Add default group to realm.
|
|
102
|
+
|
|
103
|
+
- **Required**: `realmFilter.realm` (string)
|
|
104
|
+
- **Required**: `realmFilter.id` (string, group id)
|
|
105
|
+
- **Returns**: Promise<void>
|
|
106
|
+
|
|
107
|
+
### removeDefaultGroup(realmFilter)
|
|
108
|
+
Remove default group from realm.
|
|
109
|
+
|
|
110
|
+
- **Required**: `realmFilter.realm` (string)
|
|
111
|
+
- **Required**: `realmFilter.id` (string, group id)
|
|
112
|
+
- **Returns**: Promise<void>
|
|
113
|
+
|
|
114
|
+
### getDefaultGroups(realmFilter)
|
|
115
|
+
List default groups.
|
|
116
|
+
|
|
117
|
+
- **Required**: `realmFilter.realm` (string)
|
|
118
|
+
- **Returns**: Promise<Array<GroupRepresentation>>
|
|
119
|
+
|
|
120
|
+
### getGroupByPath(realmFilter)
|
|
121
|
+
Get group by path.
|
|
122
|
+
|
|
123
|
+
- **Required**: `realmFilter.realm` (string)
|
|
124
|
+
- **Required**: `realmFilter.path` (string, example `/team/dev`)
|
|
125
|
+
- **Returns**: Promise<GroupRepresentation>
|
|
126
|
+
|
|
127
|
+
## Events
|
|
128
|
+
|
|
129
|
+
### getConfigEvents(realmFilter)
|
|
130
|
+
Get events configuration.
|
|
131
|
+
|
|
132
|
+
- **Required**: `realmFilter.realm` (string)
|
|
133
|
+
- **Returns**: Promise<object>
|
|
134
|
+
|
|
135
|
+
### updateConfigEvents(realmFilter, configurationEvents)
|
|
136
|
+
Update events configuration.
|
|
137
|
+
|
|
138
|
+
- **Required**: `realmFilter.realm` (string)
|
|
139
|
+
- **Required**: `configurationEvents` (events settings)
|
|
140
|
+
- **Returns**: Promise<void>
|
|
141
|
+
|
|
142
|
+
### findEvents(realmFilter)
|
|
143
|
+
List user events.
|
|
144
|
+
|
|
145
|
+
- **Required**: `realmFilter.realm` (string)
|
|
146
|
+
- **Optional**: `client`, `dateFrom`, `dateTo`, `first`, `max`, `ipAddress`, `type`, `user`
|
|
147
|
+
- **Returns**: Promise<Array<object>>
|
|
148
|
+
|
|
149
|
+
### findAdminEvents(realmFilter)
|
|
150
|
+
List admin events.
|
|
151
|
+
|
|
152
|
+
- **Required**: `realmFilter.realm` (string)
|
|
153
|
+
- **Optional**: `authClient`, `authIpAddress`, `authRealm`, `authUser`, `dateFrom`, `dateTo`, `first`, `max`, `operationTypes`, `resourcePath`, `resourceTypes`
|
|
154
|
+
- **Returns**: Promise<Array<object>>
|
|
155
|
+
|
|
156
|
+
### clearEvents(realmFilter)
|
|
157
|
+
Delete user events.
|
|
158
|
+
|
|
159
|
+
- **Required**: `realmFilter.realm` (string)
|
|
160
|
+
- **Returns**: Promise<void>
|
|
161
|
+
|
|
162
|
+
### clearAdminEvents(realmFilter)
|
|
163
|
+
Delete admin events.
|
|
164
|
+
|
|
165
|
+
- **Required**: `realmFilter.realm` (string)
|
|
166
|
+
- **Returns**: Promise<void>
|
|
167
|
+
|
|
168
|
+
## Users Management Permissions
|
|
169
|
+
|
|
170
|
+
### getUsersManagementPermissions(realmFilter)
|
|
171
|
+
Get realm-level users management permission status.
|
|
172
|
+
|
|
173
|
+
- **Required**: `realmFilter.realm` (string)
|
|
174
|
+
- **Returns**: Promise<object>
|
|
175
|
+
|
|
176
|
+
### updateUsersManagementPermissions(updateParameters)
|
|
177
|
+
Enable/disable users management permissions.
|
|
178
|
+
|
|
179
|
+
- **Required**: `updateParameters.realm` (string)
|
|
180
|
+
- **Required**: `updateParameters.enabled` (boolean)
|
|
181
|
+
- **Returns**: Promise<object>
|
|
182
|
+
|
|
183
|
+
## Keys, Sessions, Revocation
|
|
184
|
+
|
|
185
|
+
### getKeys(filter)
|
|
186
|
+
Get realm keys and certificates.
|
|
187
|
+
|
|
188
|
+
- **Required**: `filter.realm` (string)
|
|
189
|
+
- **Returns**: Promise<object>
|
|
190
|
+
|
|
191
|
+
### getClientSessionStats(filter)
|
|
192
|
+
Get per-client active session counts.
|
|
193
|
+
|
|
194
|
+
- **Required**: `filter.realm` (string)
|
|
195
|
+
- **Returns**: Promise<object>
|
|
196
|
+
|
|
197
|
+
### pushRevocation(filter)
|
|
198
|
+
Push revocation policy to clients.
|
|
199
|
+
|
|
200
|
+
- **Required**: `filter.realm` (string)
|
|
201
|
+
- **Returns**: Promise<void>
|
|
202
|
+
|
|
203
|
+
### logoutAll(filter)
|
|
204
|
+
Logout all users in realm.
|
|
205
|
+
|
|
206
|
+
- **Required**: `filter.realm` (string)
|
|
207
|
+
- **Returns**: Promise<void>
|
|
208
|
+
|
|
209
|
+
## LDAP / SMTP Diagnostics
|
|
210
|
+
|
|
211
|
+
### testLDAPConnection(filter, options)
|
|
212
|
+
Test LDAP connection with bind credentials.
|
|
213
|
+
|
|
214
|
+
- **Required**: `filter.realm` (string)
|
|
215
|
+
- **Required**: `options.connectionUrl` (string)
|
|
216
|
+
- **Optional**: `options.bindDn`, `options.bindCredential`, `options.useTruststoreSpi`, `options.connectionTimeout`, `options.startTls`
|
|
217
|
+
- **Returns**: Promise<object>
|
|
218
|
+
|
|
219
|
+
### ldapServerCapabilities(filter, options)
|
|
220
|
+
Check LDAP server capabilities.
|
|
221
|
+
|
|
222
|
+
- **Required**: `filter.realm` (string)
|
|
223
|
+
- **Required**: LDAP connection options (similar to `testLDAPConnection`)
|
|
224
|
+
- **Returns**: Promise<object>
|
|
225
|
+
|
|
226
|
+
### testSMTPConnection(filter, config)
|
|
227
|
+
Test SMTP configuration.
|
|
228
|
+
|
|
229
|
+
- **Required**: `filter.realm` (string)
|
|
230
|
+
- **Required**: `config.host` (string)
|
|
231
|
+
- **Optional**: `config.port`, `config.from`, `config.auth`, `config.user`, `config.password`, `config.ssl`, `config.starttls`
|
|
232
|
+
- **Returns**: Promise<object>
|
|
233
|
+
|
|
234
|
+
## Localization
|
|
235
|
+
|
|
236
|
+
### getRealmLocalizationTexts(filter)
|
|
237
|
+
Get localized text values for locale.
|
|
238
|
+
|
|
239
|
+
- **Required**: `filter.realm` (string)
|
|
240
|
+
- **Required**: `filter.selectedLocale` (string)
|
|
241
|
+
- **Optional**: `filter.first`, `filter.max`
|
|
242
|
+
- **Returns**: Promise<object>
|
|
243
|
+
|
|
244
|
+
### addLocalization(filter, value)
|
|
245
|
+
Create/update one localization key.
|
|
246
|
+
|
|
247
|
+
- **Required**: `filter.realm` (string)
|
|
248
|
+
- **Required**: `filter.selectedLocale` (string)
|
|
249
|
+
- **Required**: `filter.key` (string)
|
|
250
|
+
- **Required**: `value` (string)
|
|
251
|
+
- **Returns**: Promise<void>
|
|
252
|
+
|
|
253
|
+
### getRealmSpecificLocales(filter)
|
|
254
|
+
List enabled realm locales.
|
|
255
|
+
|
|
256
|
+
- **Required**: `filter.realm` (string)
|
|
257
|
+
- **Returns**: Promise<Array<string>>
|
|
258
|
+
|
|
259
|
+
### deleteRealmLocalizationTexts(filter)
|
|
260
|
+
Delete one localization key for locale.
|
|
261
|
+
|
|
262
|
+
- **Required**: `filter.realm` (string)
|
|
263
|
+
- **Required**: `filter.selectedLocale` (string)
|
|
264
|
+
- **Required**: `filter.key` (string)
|
|
265
|
+
- **Returns**: Promise<void>
|
|
266
|
+
|
|
267
|
+
## Example
|
|
268
|
+
|
|
269
|
+
```js
|
|
270
|
+
await KeycloakManager.realms.create({ realm: 'acme', enabled: true });
|
|
271
|
+
await KeycloakManager.realms.update({ realm: 'acme' }, { displayName: 'ACME Realm' });
|
|
272
|
+
const realm = await KeycloakManager.realms.findOne({ realm: 'acme' });
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
## See Also
|
|
276
|
+
- [API Reference](../api-reference.md)
|
|
277
|
+
- [Configuration](configuration.md)
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# Roles API
|
|
2
|
+
|
|
3
|
+
Realm and client role management, including composite roles.
|
|
4
|
+
|
|
5
|
+
**Namespace:** `KeycloakManager.roles`
|
|
6
|
+
|
|
7
|
+
## Role CRUD
|
|
8
|
+
|
|
9
|
+
### create(role_dictionary)
|
|
10
|
+
Create a realm role.
|
|
11
|
+
|
|
12
|
+
- **Required**: `role_dictionary.name` (string)
|
|
13
|
+
- **Optional**: `description`, `attributes`, `composite`, `clientRole`, `containerId`
|
|
14
|
+
- **Returns**: Promise<object>
|
|
15
|
+
|
|
16
|
+
### find(filters)
|
|
17
|
+
List realm roles.
|
|
18
|
+
|
|
19
|
+
- **Optional**: `first`, `max`, `search`, `briefRepresentation`
|
|
20
|
+
- **Returns**: Promise<Array<RoleRepresentation>>
|
|
21
|
+
|
|
22
|
+
### findOneByName(filters)
|
|
23
|
+
Get role by name.
|
|
24
|
+
|
|
25
|
+
- **Required**: `filters.name` (string)
|
|
26
|
+
- **Returns**: Promise<RoleRepresentation>
|
|
27
|
+
|
|
28
|
+
### findOneById(filters)
|
|
29
|
+
Get role by id.
|
|
30
|
+
|
|
31
|
+
- **Required**: `filters.id` (string)
|
|
32
|
+
- **Returns**: Promise<RoleRepresentation>
|
|
33
|
+
|
|
34
|
+
### updateByName(filters, role_dictionary)
|
|
35
|
+
Update role by name.
|
|
36
|
+
|
|
37
|
+
- **Required**: `filters.name` (string)
|
|
38
|
+
- **Required**: `role_dictionary` (partial role)
|
|
39
|
+
- **Returns**: Promise<void>
|
|
40
|
+
|
|
41
|
+
### updateById(filters, role_dictionary)
|
|
42
|
+
Update role by id.
|
|
43
|
+
|
|
44
|
+
- **Required**: `filters.id` (string)
|
|
45
|
+
- **Required**: `role_dictionary` (partial role)
|
|
46
|
+
- **Returns**: Promise<void>
|
|
47
|
+
|
|
48
|
+
### delByName(filters)
|
|
49
|
+
Delete role by name.
|
|
50
|
+
|
|
51
|
+
- **Required**: `filters.name` (string)
|
|
52
|
+
- **Returns**: Promise<void>
|
|
53
|
+
|
|
54
|
+
## Composite Roles
|
|
55
|
+
|
|
56
|
+
### createComposite(filters, roles)
|
|
57
|
+
Add composites to a realm role.
|
|
58
|
+
|
|
59
|
+
- **Required**: `filters.roleName` (string)
|
|
60
|
+
- **Required**: `roles` (Array<{id,name}>), realm or client roles
|
|
61
|
+
- **Returns**: Promise<void>
|
|
62
|
+
|
|
63
|
+
### getCompositeRoles(filters)
|
|
64
|
+
Get all composites for a role.
|
|
65
|
+
|
|
66
|
+
- **Required**: `filters.roleName` (string)
|
|
67
|
+
- **Returns**: Promise<Array<RoleRepresentation>>
|
|
68
|
+
|
|
69
|
+
### getCompositeRolesForRealm(filters)
|
|
70
|
+
Get realm-level composites.
|
|
71
|
+
|
|
72
|
+
- **Required**: `filters.roleName` (string)
|
|
73
|
+
- **Returns**: Promise<Array<RoleRepresentation>>
|
|
74
|
+
|
|
75
|
+
### getCompositeRolesForClient(filters)
|
|
76
|
+
Get client-level composites.
|
|
77
|
+
|
|
78
|
+
- **Required**: `filters.roleName` (string)
|
|
79
|
+
- **Required**: `filters.clientUniqueId` (client UUID)
|
|
80
|
+
- **Returns**: Promise<Array<RoleRepresentation>>
|
|
81
|
+
|
|
82
|
+
## Users with Role
|
|
83
|
+
|
|
84
|
+
### findUsersWithRole(filters)
|
|
85
|
+
List users that have a specific realm role.
|
|
86
|
+
|
|
87
|
+
- **Required**: `filters.name` (role name)
|
|
88
|
+
- **Optional**: `first`, `max`
|
|
89
|
+
- **Returns**: Promise<Array<UserRepresentation>>
|
|
90
|
+
|
|
91
|
+
## Example
|
|
92
|
+
|
|
93
|
+
```js
|
|
94
|
+
await KeycloakManager.roles.create({ name: 'realm-admin' });
|
|
95
|
+
const role = await KeycloakManager.roles.findOneByName({ name: 'realm-admin' });
|
|
96
|
+
const users = await KeycloakManager.roles.findUsersWithRole({ name: 'realm-admin' });
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## See Also
|
|
100
|
+
- [API Reference](../api-reference.md)
|
|
101
|
+
- [Users](users.md)
|
|
102
|
+
- [Clients](clients.md)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Server Info API
|
|
2
|
+
|
|
3
|
+
Read Keycloak server capabilities and runtime metadata.
|
|
4
|
+
|
|
5
|
+
**Namespace:** `KeycloakManager.serverInfo`
|
|
6
|
+
|
|
7
|
+
## Methods
|
|
8
|
+
|
|
9
|
+
### getInfo()
|
|
10
|
+
Get full server-info payload.
|
|
11
|
+
|
|
12
|
+
- **Params**: none
|
|
13
|
+
- **Returns**: Promise<object>
|
|
14
|
+
|
|
15
|
+
The payload typically includes:
|
|
16
|
+
- `systemInfo`
|
|
17
|
+
- `memoryInfo`
|
|
18
|
+
- `profileInfo`
|
|
19
|
+
- `themes`
|
|
20
|
+
- `providers`
|
|
21
|
+
- `componentTypes`
|
|
22
|
+
- `passwordPolicies`
|
|
23
|
+
- `protocolMapperTypes`
|
|
24
|
+
- `clientInstallations`
|
|
25
|
+
- `enums`
|
|
26
|
+
|
|
27
|
+
## Example
|
|
28
|
+
|
|
29
|
+
```js
|
|
30
|
+
const info = await KeycloakManager.serverInfo.getInfo();
|
|
31
|
+
|
|
32
|
+
console.log('Keycloak version:', info.systemInfo?.version);
|
|
33
|
+
console.log('Available themes:', Object.keys(info.themes || {}));
|
|
34
|
+
console.log('Available provider categories:', Object.keys(info.providers || {}));
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## See Also
|
|
38
|
+
- [API Reference](../api-reference.md)
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# User Profile API
|
|
2
|
+
|
|
3
|
+
Manage realm user-profile configuration and metadata.
|
|
4
|
+
|
|
5
|
+
**Namespace:** `KeycloakManager.userProfile`
|
|
6
|
+
|
|
7
|
+
## Methods
|
|
8
|
+
|
|
9
|
+
### getConfiguration(filter)
|
|
10
|
+
Get user-profile configuration for realm.
|
|
11
|
+
|
|
12
|
+
- **Optional**: realm context fields
|
|
13
|
+
- **Returns**: Promise<object>
|
|
14
|
+
|
|
15
|
+
### updateConfiguration(filter, userProfileConfig)
|
|
16
|
+
Update user-profile configuration.
|
|
17
|
+
|
|
18
|
+
- **Optional**: realm context fields
|
|
19
|
+
- **Required**: `userProfileConfig` (full/partial config object)
|
|
20
|
+
- **Returns**: Promise<void|object>
|
|
21
|
+
|
|
22
|
+
### getMetadata(filter)
|
|
23
|
+
Get resolved user-profile metadata.
|
|
24
|
+
|
|
25
|
+
- **Optional**: realm context fields
|
|
26
|
+
- **Returns**: Promise<object>
|
|
27
|
+
|
|
28
|
+
## Common User Profile Structure
|
|
29
|
+
|
|
30
|
+
Typical top-level fields used in `userProfileConfig`:
|
|
31
|
+
- `attributes`: Array of attribute definitions
|
|
32
|
+
- `groups`: Optional group definitions
|
|
33
|
+
- `unmanagedAttributePolicy`: Optional unmanaged policy
|
|
34
|
+
|
|
35
|
+
Each attribute may contain:
|
|
36
|
+
- `name` (required)
|
|
37
|
+
- `displayName`, `required`, `permissions`, `validations`, `annotations`, `multivalued`
|
|
38
|
+
|
|
39
|
+
## Example
|
|
40
|
+
|
|
41
|
+
```js
|
|
42
|
+
const currentConfig = await KeycloakManager.userProfile.getConfiguration();
|
|
43
|
+
|
|
44
|
+
await KeycloakManager.userProfile.updateConfiguration({}, {
|
|
45
|
+
...currentConfig,
|
|
46
|
+
attributes: [
|
|
47
|
+
...(currentConfig.attributes || []),
|
|
48
|
+
{
|
|
49
|
+
name: 'department',
|
|
50
|
+
displayName: '${department}',
|
|
51
|
+
required: { roles: ['admin'] },
|
|
52
|
+
permissions: { view: ['admin', 'user'], edit: ['admin'] },
|
|
53
|
+
validations: { length: { min: 2, max: 64 } }
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
const metadata = await KeycloakManager.userProfile.getMetadata();
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## See Also
|
|
62
|
+
- [API Reference](../api-reference.md)
|
|
63
|
+
- [Users](users.md)
|