diegosm / keycloak-admin
PHP Library for Keycloak REST API management
Installs: 2 148
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 1
Forks: 3
Open Issues: 1
Requires
- php: ^7.1
- ext-json: *
- guzzlehttp/guzzle: ^7
- jms/serializer: ^3.6
Requires (Dev)
- phpunit/phpunit: ^9.0
- squizlabs/php_codesniffer: ^3.4
README
PHP Library for Keycloak Rest API management
Documentation
The documentation of this project is available at https://keycloak-admin-documentation.readthedocs.io/en/latest/
Installation
composer require diegosm/keycloak-admin
Configure
First of all create a client on master realm, with name like manager-cli
of type confidential
and need to enable Service Accounts.
You will use to manage your realm, and log in with client_credential grant type.
There have a factory for create keycloakadmin, put there your configuration:
$keycloakAdmin = KeycloakAdminFactory::create( $username, // your confidential client name $password, // the client secret $url // default root url like http://keycloak:8080/auth );
To do list (Not ordered by priority)
- Create role composites
- Review and make tests for all exceptions.
- Make realm extra endpoints (i.e. clear sessions).
- Change User access from array to a Class.
Create representation classes
- AuthenticationFlowRepresentation (could be used on realm)
- AuthenticatorConfigRepresentation (could be used on realm)
- ClientScopeRepresentation (could be used on realm)
- IdentityProviderMapperRepresentation (could be used on realm)
- UserFederationMappers (could be used on realm)