logicpanel / keycloak-php-sdk
PHP wrapper for the KeyCloak admin API
0.0.1
2021-04-21 13:32 UTC
Requires
- php: >=7.3
- ext-json: *
- guzzlehttp/guzzle: ^5.3|^6.3
- league/oauth2-client: ^2.4
Requires (Dev)
- phpunit/phpunit: ^7.5
- symfony/dotenv: ^4.3
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
This package aims to wrap the Keycloak API and provide an easy and consistent layer for managing your keycloak realms.
Documentation
Quick start
First create a KeycloakClient with your credentials.
$kcClient = new Keycloak\KeycloakClient( 'my-client-id', 'my-client-secret', 'my-realm', 'https://my-keycloak-base-url.com' );
Or use a admin user credentials.
$kcClient = new Keycloak\KeycloakPasswordClient( 'my-realm', 'https://my-keycloak-base-url.com', 'username', 'password' );
Then you can pass the client to any of the APIs.
$userApi = new Keycloak\User\Api($kcClient); $allUsers = $userApi->findAll();
Tested platforms
These are the platforms which are officially supported by this package. Any other versions will probably work but is not guaranteed.
| Platform | Version |
|---|---|
| PHP | 7.3 |
| Keycloak | 11 |
Contributing
Please read our contribution guidelines before contributing.