From b272d59f6d27eb65af18a43569b87b2830adcff5 Mon Sep 17 00:00:00 2001 From: Michael Rosenberger Date: Wed, 26 Oct 2022 12:05:23 +0200 Subject: [PATCH 1/2] Add functions to get user consents --- README.md | 2 +- src/Admin/Resources/keycloak-1_0.php | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index f95200c..faaaf58 100644 --- a/README.md +++ b/README.md @@ -584,7 +584,7 @@ Note: Ids are sent as clientScopeId or clientId and mapperId everything else is | Update the user | updateUser | ️️️✔️ | | Update partial data for the user | updatePartialUser | ️️️✔️ | | Delete the user | deleteUser | ️️️✔️ | -| Get consents granted by the user | | ❌ | +| Get consents granted by the user | | ️✔️ | | Revoke consent and offline tokens for particular client from user | | ❌ | | Disable all credentials for a user of a specific type | | ❌ | | Send a update account email to the user An email contains a link the user can click to perform a set of required actions. | executeActionsEmail | ✔️ | diff --git a/src/Admin/Resources/keycloak-1_0.php b/src/Admin/Resources/keycloak-1_0.php index d02221a..dc267ce 100644 --- a/src/Admin/Resources/keycloak-1_0.php +++ b/src/Admin/Resources/keycloak-1_0.php @@ -5197,6 +5197,26 @@ ) ), + 'getUserConsents' => array( + 'uri' => 'admin/realms/{realm}/users/{id}/consents', + 'description' => 'Get the consents granted by a user', + 'httpMethod' => 'GET', + 'parameters' => array( + 'realm' => array( + 'location' => 'uri', + 'description' => 'The Realm name', + 'type' => 'string', + 'required' => true, + ), + 'id' => array( + 'location' => 'uri', + 'description' => 'User id', + 'type' => 'string', + 'required' => true + ) + ) + ), + 'updateUser' => array( 'uri' => 'admin/realms/{realm}/users/{id}', 'description' => 'Update a user (Username must be unique)', From 41d96139d4a0323d82a5fba372301da521b1b744 Mon Sep 17 00:00:00 2001 From: Mohammad Waleed Date: Tue, 15 Nov 2022 06:40:05 +0000 Subject: [PATCH 2/2] update definitions --- src/Admin/KeycloakClient.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Admin/KeycloakClient.php b/src/Admin/KeycloakClient.php index 58ec556..df62886 100644 --- a/src/Admin/KeycloakClient.php +++ b/src/Admin/KeycloakClient.php @@ -275,9 +275,10 @@ * @method array syncUserStorage(array $args = array()) { @command Keycloak syncUserStorage } * * @method array getSocialLogins(array $args = array()) { @command Keycloak getSocialLogins } - * @method array addSocialLogin(array $args = array()) { @command Keycloak getSocialLogins } - * @method array removeSocialLogin(array $args = array()) { @command Keycloak getSocialLogins } - * + * @method array addSocialLogin(array $args = array()) { @command Keycloak addSocialLogin } + * @method array removeSocialLogin(array $args = array()) { @command Keycloak removeSocialLogin } + * @method array getUserConsents(array $args = array()) { @command Keycloak getUserConsents } + * */ class KeycloakClient extends GuzzleClient