4
4
![ PHP Legacy (Keycloak compatibility)] ( https://github.com/fschmtt/keycloak-rest-api-client-php/actions/workflows/php-integration-legacy.yml/badge.svg?branch=main )
5
5
6
6
# Keycloak Admin REST API Client
7
- PHP client to interact with [ Keycloak's Admin REST API] ( https://www.keycloak.org/docs-api/20 .0.0/rest-api/index.html ) .
7
+ PHP client to interact with [ Keycloak's Admin REST API] ( https://www.keycloak.org/docs-api/21 .0.0/rest-api/index.html ) .
8
8
9
9
Inspired by [ keycloak/keycloak-nodejs-admin-client] ( https://github.com/keycloak/keycloak-nodejs-admin-client ) .
10
10
@@ -42,28 +42,28 @@ echo sprintf(
42
42
```
43
43
will print e.g.
44
44
``` text
45
- Keycloak 20 .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.
45
+ Keycloak 21 .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
46
```
47
47
48
48
More examples can be found in the [ examples] ( examples ) directory.
49
49
50
50
## Available Resources
51
- ### [ Attack Detection] ( https://www.keycloak.org/docs-api/20 .0.0/rest-api/index.html#_attack_detection_resource )
51
+ ### [ Attack Detection] ( https://www.keycloak.org/docs-api/21 .0.0/rest-api/index.html#_attack_detection_resource )
52
52
| Endpoint | Response | API |
53
53
| ----------| ----------| -----|
54
54
| ` DELETE /admin/realms/{realm}/attack-detection/brute-force/users ` | ` n/a ` | [ AttackDetection::clear()] ( src/Resource/AttackDetection.php ) |
55
55
| ` GET /admin/realms/{realm}/attack-detection/brute-force/users/{userId} ` | [ Map] ( src/Type/Map.php ) | [ AttackDetection::userStatus()] ( src/Resource/AttackDetection.php ) |
56
56
| ` DELETE /admin/realms/{realm}/attack-detection/brute-force/users/{userId} ` | ` n/a ` | [ AttackDetection::clearUser()] ( src/Resource/AttackDetection.php ) |
57
57
58
- ### [ Clients] ( https://www.keycloak.org/docs-api/20 .0.0/rest-api/index.html#_clients_resource )
58
+ ### [ Clients] ( https://www.keycloak.org/docs-api/21 .0.0/rest-api/index.html#_clients_resource )
59
59
| Endpoint | Response | API |
60
60
| ----------| ----------| -----|
61
61
| ` GET /admin/realms/{realm}/clients ` | [ ClientCollection] ( src/Collection/ClientCollection.php ) | [ Clients::all()] ( src/Resource/Clients.php ) |
62
62
| ` GET /admin/realms/{realm}/clients/{id} ` | [ Client] ( src/Representation/Client.php ) | [ Clients::get()] ( src/Resource/Clients.php ) |
63
63
| ` PUT /admin/realms/{realm}/clients/{id} ` | [ Client] ( src/Representation/Client.php ) | [ Clients::update()] ( src/Resource/Clients.php ) |
64
64
| ` POST /admin/realms/{realm}/clients ` | [ Client] ( src/Representation/Client.php ) | [ Clients::import()] ( src/Resource/Clients.php ) |
65
65
66
- ### [ Groups] ( https://www.keycloak.org/docs-api/20 .0.0/rest-api/index.html#_clients_resource )
66
+ ### [ Groups] ( https://www.keycloak.org/docs-api/21 .0.0/rest-api/index.html#_clients_resource )
67
67
| Endpoint | Response | API |
68
68
| ----------| ----------| -----|
69
69
| ` GET /admin/realms/{realm}/groups ` | [ ClientCollection] ( src/Collection/GroupCollection.php ) | [ Groups::all()] ( src/Resource/Groups.php ) |
@@ -72,7 +72,7 @@ More examples can be found in the [examples](examples) directory.
72
72
| ` POST /admin/realms/{realm}/groups ` | ` n/a ` | [ Groups::import()] ( src/Resource/Groups.php ) |
73
73
| ` DELETE /admin/realms/{realm}/groups ` | ` n/a ` | [ Groups::delete()] ( src/Resource/Groups.php ) |
74
74
75
- ### [ Realms Admin] ( https://www.keycloak.org/docs-api/20 .0.0/rest-api/index.html#_realms_admin_resource )
75
+ ### [ Realms Admin] ( https://www.keycloak.org/docs-api/21 .0.0/rest-api/index.html#_realms_admin_resource )
76
76
| Endpoint | Response | API |
77
77
| ----------| ----------| -----|
78
78
| ` POST /admin/realms ` | [ Realm] ( src/Representation/Realm.php ) | [ Realms::import()] ( src/Resource/Realms.php ) |
@@ -85,7 +85,7 @@ More examples can be found in the [examples](examples) directory.
85
85
| ` POST /admin/realms/{realm}/clear-realm-cache ` | ` n/a ` | [ Realms::clearRealmCache()] ( src/Resource/Realms.php ) |
86
86
| ` POST /admin/realms/{realm}/clear-user-cache ` | ` n/a ` | [ Realms::clearUserCache()] ( src/Resource/Realms.php ) |
87
87
88
- ### [ Users] ( https://www.keycloak.org/docs-api/20 .0.0/rest-api/index.html#_users_resource )
88
+ ### [ Users] ( https://www.keycloak.org/docs-api/21 .0.0/rest-api/index.html#_users_resource )
89
89
| Endpoint | Response | API |
90
90
| ----------| ----------| -----|
91
91
| ` GET /admin/realms/{realm}/users ` | [ UserCollection] ( src/Collection/UserCollection.php ) | [ Users::all()] ( src/Resource/Users.php ) |
@@ -102,15 +102,15 @@ More examples can be found in the [examples](examples) directory.
102
102
| ` POST /{realm}/users/{id}/role-mappings/realm ` | ` n/a ` | [ Users::addRealmRoles()] ( src/Resource/Users.php ) |
103
103
| ` DELETE /{realm}/users/{id}/role-mappings/realm ` | ` n/a ` | [ Users::removeRealmRoles()] ( src/Resource/Users.php ) |
104
104
105
- ### [ Roles] ( https://www.keycloak.org/docs-api/20 .0.0/rest-api/index.html#_roles_resource )
105
+ ### [ Roles] ( https://www.keycloak.org/docs-api/21 .0.0/rest-api/index.html#_roles_resource )
106
106
| Endpoint | Response | API |
107
107
| ----------| ----------| -----|
108
108
| ` GET /admin/realms/{realm}/roles ` | [ RoleCollection] ( src/Collection/RoleCollection.php ) | [ Roles::all()] ( src/Resource/Roles.php ) |
109
109
| ` GET /admin/realms/{realm}/roles/{roleName} ` | [ Role] ( src/Representation/Role.php ) | [ Roles::get()] ( src/Resource/Roles.php ) |
110
110
| ` POST /admin/realms/{realm}/roles ` | ` n/a ` | [ Roles::create()] ( src/Resource/Roles.php ) |
111
111
| ` DELETE /admin/realms/{realm}/roles/{roleName} ` | ` n/a ` | [ Roles::delete()] ( src/Resource/Roles.php ) |
112
112
113
- ### [ Root] ( https://www.keycloak.org/docs-api/20 .0.0/rest-api/index.html#_root_resource )
113
+ ### [ Root] ( https://www.keycloak.org/docs-api/21 .0.0/rest-api/index.html#_root_resource )
114
114
| Endpoint | Response | API |
115
115
| ----------| ----------| -----|
116
116
| ` GET /admin/serverinfo ` | [ ServerInfo] ( src/Representation/ServerInfo.php ) | [ ServerInfo::get()] ( src/Resource/ServerInfo.php ) |
0 commit comments