5
5
![ PHP Legacy (Keycloak compatibility)] ( https://github.com/fschmtt/keycloak-rest-api-client-php/actions/workflows/php-integration-legacy.yml/badge.svg?branch=main )
6
6
7
7
# Keycloak Admin REST API Client
8
- PHP client to interact with [ Keycloak's Admin REST API] ( https://www.keycloak.org/docs-api/23 .0.0/rest-api/index.html ) .
8
+ PHP client to interact with [ Keycloak's Admin REST API] ( https://www.keycloak.org/docs-api/24 .0.0/rest-api/index.html ) .
9
9
10
10
Inspired by [ keycloak/keycloak-nodejs-admin-client] ( https://github.com/keycloak/keycloak-nodejs-admin-client ) .
11
11
@@ -43,7 +43,7 @@ echo sprintf(
43
43
```
44
44
will print e.g.
45
45
``` text
46
- Keycloak 23 .0.0 is running on Linux/5.10.25-linuxkit (amd64) with OpenJDK 64-Bit Server VM/11.0.11 since 0 days, 2 hours, 37 minutes, 7 seconds and is currently using 139 MB of 512 MB (28 %) memory.
46
+ Keycloak 24 .0.0 is running on Linux/5.10.25-linuxkit (amd64) with OpenJDK 64-Bit Server VM/11.0.11 since 0 days, 2 hours, 37 minutes, 7 seconds and is currently using 139 MB of 512 MB (28 %) memory.
47
47
```
48
48
49
49
More examples can be found in the [ examples] ( examples ) directory.
@@ -94,22 +94,22 @@ $myCustomRepresentation = $myCustomResource->myCustomEndpoint();
94
94
```
95
95
96
96
## Available Resources
97
- ### [ Attack Detection] ( https://www.keycloak.org/docs-api/23 .0.0/rest-api/index.html#_attack_detection_resource )
97
+ ### [ Attack Detection] ( https://www.keycloak.org/docs-api/24 .0.0/rest-api/index.html#_attack_detection_resource )
98
98
| Endpoint | Response | API |
99
99
| ----------| ----------| -----|
100
100
| ` DELETE /admin/realms/{realm}/attack-detection/brute-force/users ` | ` n/a ` | [ AttackDetection::clear()] ( src/Resource/AttackDetection.php ) |
101
101
| ` GET /admin/realms/{realm}/attack-detection/brute-force/users/{userId} ` | [ Map] ( src/Type/Map.php ) | [ AttackDetection::userStatus()] ( src/Resource/AttackDetection.php ) |
102
102
| ` DELETE /admin/realms/{realm}/attack-detection/brute-force/users/{userId} ` | ` n/a ` | [ AttackDetection::clearUser()] ( src/Resource/AttackDetection.php ) |
103
103
104
- ### [ Clients] ( https://www.keycloak.org/docs-api/23 .0.0/rest-api/index.html#_clients_resource )
104
+ ### [ Clients] ( https://www.keycloak.org/docs-api/24 .0.0/rest-api/index.html#_clients_resource )
105
105
| Endpoint | Response | API |
106
106
| ----------| ----------| -----|
107
107
| ` GET /admin/realms/{realm}/clients ` | [ ClientCollection] ( src/Collection/ClientCollection.php ) | [ Clients::all()] ( src/Resource/Clients.php ) |
108
108
| ` GET /admin/realms/{realm}/clients/{id} ` | [ Client] ( src/Representation/Client.php ) | [ Clients::get()] ( src/Resource/Clients.php ) |
109
109
| ` PUT /admin/realms/{realm}/clients/{id} ` | [ Client] ( src/Representation/Client.php ) | [ Clients::update()] ( src/Resource/Clients.php ) |
110
110
| ` POST /admin/realms/{realm}/clients ` | [ Client] ( src/Representation/Client.php ) | [ Clients::import()] ( src/Resource/Clients.php ) |
111
111
112
- ### [ Groups] ( https://www.keycloak.org/docs-api/23 .0.0/rest-api/index.html#_clients_resource )
112
+ ### [ Groups] ( https://www.keycloak.org/docs-api/24 .0.0/rest-api/index.html#_clients_resource )
113
113
| Endpoint | Response | API |
114
114
| ---------------------------------------------------| ----------| -----------------------------------------------|
115
115
| ` GET /admin/realms/{realm}/groups ` | [ GroupCollection] ( src/Collection/GroupCollection.php ) | [ Groups::all()] ( src/Resource/Groups.php ) |
@@ -120,7 +120,7 @@ $myCustomRepresentation = $myCustomResource->myCustomEndpoint();
120
120
| ` POST /admin/realms/{realm}/groups/{id}/children ` | ` n/a ` | [ Groups::create()] ( src/Resource/Groups.php ) |
121
121
| ` DELETE /admin/realms/{realm}/groups ` | ` n/a ` | [ Groups::delete()] ( src/Resource/Groups.php ) |
122
122
123
- ### [ Realms Admin] ( https://www.keycloak.org/docs-api/23 .0.0/rest-api/index.html#_realms_admin_resource )
123
+ ### [ Realms Admin] ( https://www.keycloak.org/docs-api/24 .0.0/rest-api/index.html#_realms_admin_resource )
124
124
| Endpoint | Response | API |
125
125
| ----------| ----------| -----|
126
126
| ` POST /admin/realms ` | [ Realm] ( src/Representation/Realm.php ) | [ Realms::import()] ( src/Resource/Realms.php ) |
@@ -134,7 +134,7 @@ $myCustomRepresentation = $myCustomResource->myCustomEndpoint();
134
134
| ` POST /admin/realms/{realm}/clear-realm-cache ` | ` n/a ` | [ Realms::clearRealmCache()] ( src/Resource/Realms.php ) |
135
135
| ` POST /admin/realms/{realm}/clear-user-cache ` | ` n/a ` | [ Realms::clearUserCache()] ( src/Resource/Realms.php ) |
136
136
137
- ### [ Users] ( https://www.keycloak.org/docs-api/23 .0.0/rest-api/index.html#_users_resource )
137
+ ### [ Users] ( https://www.keycloak.org/docs-api/24 .0.0/rest-api/index.html#_users_resource )
138
138
| Endpoint | Response | API |
139
139
| ----------| ----------| -----|
140
140
| ` GET /admin/realms/{realm}/users ` | [ UserCollection] ( src/Collection/UserCollection.php ) | [ Users::all()] ( src/Resource/Users.php ) |
@@ -152,15 +152,15 @@ $myCustomRepresentation = $myCustomResource->myCustomEndpoint();
152
152
| ` DELETE /{realm}/users/{id}/role-mappings/realm ` | ` n/a ` | [ Users::removeRealmRoles()] ( src/Resource/Users.php ) |
153
153
| ` PUT /{realm}/users/{id}/execute-actions-email ` | ` n/a ` | [ Users::executeActionsEmail()] ( src/Resource/Users.php ) |
154
154
155
- ### [ Roles] ( https://www.keycloak.org/docs-api/23 .0.0/rest-api/index.html#_roles_resource )
155
+ ### [ Roles] ( https://www.keycloak.org/docs-api/24 .0.0/rest-api/index.html#_roles_resource )
156
156
| Endpoint | Response | API |
157
157
| ----------| ----------| -----|
158
158
| ` GET /admin/realms/{realm}/roles ` | [ RoleCollection] ( src/Collection/RoleCollection.php ) | [ Roles::all()] ( src/Resource/Roles.php ) |
159
159
| ` GET /admin/realms/{realm}/roles/{roleName} ` | [ Role] ( src/Representation/Role.php ) | [ Roles::get()] ( src/Resource/Roles.php ) |
160
160
| ` POST /admin/realms/{realm}/roles ` | ` n/a ` | [ Roles::create()] ( src/Resource/Roles.php ) |
161
161
| ` DELETE /admin/realms/{realm}/roles/{roleName} ` | ` n/a ` | [ Roles::delete()] ( src/Resource/Roles.php ) |
162
162
163
- ### [ Root] ( https://www.keycloak.org/docs-api/23 .0.0/rest-api/index.html#_root_resource )
163
+ ### [ Root] ( https://www.keycloak.org/docs-api/24 .0.0/rest-api/index.html#_root_resource )
164
164
| Endpoint | Response | API |
165
165
| ----------| ----------| -----|
166
166
| ` GET /admin/serverinfo ` | [ ServerInfo] ( src/Representation/ServerInfo.php ) | [ ServerInfo::get()] ( src/Resource/ServerInfo.php ) |
0 commit comments