PHP code example of logicpanel / keycloak-php-sdk
1. Go to this page and download the library: Download logicpanel/keycloak-php-sdk library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
logicpanel / keycloak-php-sdk example snippets
$kcClient = new Keycloak\KeycloakClient(
'my-client-id',
'my-client-secret',
'my-realm',
'https://my-keycloak-base-url.com'
);
$kcClient = new Keycloak\KeycloakPasswordClient(
'my-realm',
'https://my-keycloak-base-url.com',
'username',
'password'
);
$userApi = new Keycloak\User\Api($kcClient);
$allUsers = $userApi->findAll();