Skip to content

Commit

Permalink
Merge pull request #98 from foliengriller/develop
Browse files Browse the repository at this point in the history
Add functions to get user consents
  • Loading branch information
MohammadWaleed authored Nov 15, 2022
2 parents 3891723 + 41d9613 commit ad0afa0
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 | ✔️ |
Expand Down
7 changes: 4 additions & 3 deletions src/Admin/KeycloakClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
20 changes: 20 additions & 0 deletions src/Admin/Resources/keycloak-1_0.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)',
Expand Down

0 comments on commit ad0afa0

Please sign in to comment.