A very quick update post.
As part of the Day Job tm we have been doing a lot of work with Keycloak, and the Keycloak API. Specifically, interfacing with the new, and largely undocumented, Account management API.
I’ve written a bit about this before, but I wanted to point out that as part of this work we have Open Sourced the library that we’re building.
Add it to your project by using:
composer require aria-php/keycloak-api
Then you can do the following, example:
use ARIA\KeycloakAPI\AccountAPI;
...
$api = new AccountAPI($client_id, $secret, 'master', 'http://localhost:8080');
$api->setBearer($access_token);
$profile = $api->getProfile();
// Make your updates here
$api->setProfile($profile);
Early days right now, but hopefully this will save some of you some time!