Skip to content

Commit

Permalink
Merge pull request #104 from MohammadWaleed/develop
Browse files Browse the repository at this point in the history
prepare for 0.35.0
  • Loading branch information
MohammadWaleed authored Jan 26, 2023
2 parents dc745dd + 347f1e2 commit db3e12a
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 34 deletions.
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -582,27 +582,26 @@ Note: Ids are sent as clientScopeId or clientId and mapperId everything else is
| GET /{realm}/users/count | getUserCount | ✔️ |
| Get representation of the user | getUser | ️️️✔️ |
| Update the user | updateUser | ️️️✔️ |
| Update partial data for the user | updatePartialUser | ️️️✔️ |
| Delete the user | deleteUser | ️️️✔️ |
| 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 | ✔️ |
| Get social logins associated with the user | | |
| Add a social login provider to the user | | |
| Remove a social login provider from user | | |
| Get social logins associated with the user | | ✔️ |
| Add a social login provider to the user | | ✔️ |
| Remove a social login provider from user | | ✔️ |
| GET /{realm}/users/{id}/groups | getUserGroups | ✔️ |
| GET /{realm}/users/{id}/groups/count | getUserGroupsCount | ✔️ |
| PUT /{realm}/users/{id}/groups/{groupId} | addUserToGroup | ✔️ |
| DELETE /{realm}/users/{id}/groups/{groupId} | deleteUserFromGroup | ✔️ |
| Impersonate the user | | |
| Remove all user sessions associated with the user Also send notification to all clients that have an admin URL to invalidate the sessions for the particular user. | | |
| Impersonate the user | impersonateUser | ✔️ |
| Remove all user sessions associated with the user Also send notification to all clients that have an admin URL to invalidate the sessions for the particular user. | logoutUser | ✔️ |
| Get offline sessions associated with the user and client | ||
| Remove TOTP from the user | ||
| Set up a new password for the user. | resetUserPassword | ✔️ |
| Send an email-verification email to the user An email contains a link the user can click to verify their email address. | sendVerifyEmail | ✔️ |
| Get sessions associated with the user | getUserSessions | |
| Get credentials associated with the user | getUserCredentials | |
| Get sessions associated with the user | getUserSessions | ✔️ |
| Get credentials associated with the user | getUserCredentials | ✔️ |

## [Root]()

Expand Down
10 changes: 5 additions & 5 deletions src/Admin/KeycloakClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@
* @method array getUserGroups(array $args = array()) { @command Keycloak getUserGroups }
* @method array getUserGroupsCount(array $args = array()) { @command Keycloak getUserGroupsCount }
* @method array updateUser(array $args = array()) { @command Keycloak updateUser }
* @method array updatePartialUser(array $args = array()) { @command Keycloak updatePartialUser }
* @method array deleteUser(array $args = array()) { @command Keycloak deleteUser }
* @method array executeActionsEmail(array $args = array()) { @command Keycloak executeActionsEmail }
* @method array sendVerifyEmail(array $args = array()) { @command Keycloak sendVerifyEmail }
Expand All @@ -272,14 +271,15 @@
* @method array resetUserPassword(array $args = array()) { @command Keycloak resetUserPassword }
* @method array getUserSessions(array $args = array()) { @command Keycloak getUserSessions }
* @method array getUserCredentials(array $args = array()) { @command Keycloak getUserCredentials }
*
* @method array syncUserStorage(array $args = array()) { @command Keycloak syncUserStorage }
* @method array impersonateUser(array $args = array()) { @command Keycloak impersonateUser }
* @method array logoutUser(array $args = array()) { @command Keycloak logoutUser }
*
* @method array getSocialLogins(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 syncUserStorage(array $args = array()) { @command Keycloak syncUserStorage }
* @method array getUserConsents(array $args = array()) { @command Keycloak getUserConsents }
*
*
*/

class KeycloakClient extends GuzzleClient
Expand Down Expand Up @@ -311,7 +311,7 @@ public static function factory($config = array())

$stack = new HandlerStack();
$stack->setHandler(new CurlHandler());

$middlewares = isset($config["middlewares"]) && is_array($config["middlewares"]) ? $config["middlewares"] : [];
foreach ($middlewares as $middleware) {
if (is_callable($middleware)) {
Expand Down
66 changes: 45 additions & 21 deletions src/Admin/Resources/keycloak-1_0.php
Original file line number Diff line number Diff line change
Expand Up @@ -5237,26 +5237,6 @@
) + $UserRepresentation
),

'updatePartialUser' => array(
'uri' => 'admin/realms/{realm}/users/{id}',
'description' => 'Update a user (Username must be unique)',
'httpMethod' => 'PATCH',
'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,
),
) + $UserRepresentation
),

'deleteUser' => array(
'uri' => 'admin/realms/{realm}/users/{id}',
'description' => 'Delete a user',
Expand Down Expand Up @@ -5319,7 +5299,7 @@
),
),
),

'sendVerifyEmail' => array(
'uri' => 'admin/realms/{realm}/users/{id}/send-verify-email',
'description' => 'Send an email-verification email to the user An email contains a link the user can click to verify their email address.',
Expand Down Expand Up @@ -5489,6 +5469,7 @@
)
)
),

'getSocialLogins' => array(
'uri' => 'admin/realms/{realm}/users/{id}/federated-identity',
'description' => 'Get social logins associated with the user',
Expand All @@ -5508,6 +5489,7 @@
),
)
),

'removeSocialLogin' => array(
'uri' => 'admin/realms/{realm}/users/{id}/federated-identity/{providerId}',
'description' => 'Remove social login associated with the user',
Expand All @@ -5533,6 +5515,7 @@
),
)
),

'addSocialLogin' => array(
'uri' => 'admin/realms/{realm}/users/{id}/federated-identity/{providerId}',
'description' => 'Add social login associated with the user',
Expand All @@ -5558,5 +5541,46 @@
),
) + $FederatedIdentityRepresentation,
),

'impersonateUser' => array(
'uri' => 'admin/realms/{realm}/users/{id}/impersonation',
'description' => 'Remove all sessions associated with the user',
'httpMethod' => 'POST',
'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
)
)
),

'logoutUser' => array(
'uri' => 'admin/realms/{realm}/users/{id}/logout',
'description' => 'Remove all sessions associated with the user',
'httpMethod' => 'POST',
'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
)
)
),

) //End of Operations Array
);//End of return array

0 comments on commit db3e12a

Please sign in to comment.