overtrue/keycloak-admin

PHP client for the Keycloak Admin API

dev-master 2025-02-18 05:42 UTC

This package is auto-updated.

Last update: 2025-02-18 05:43:00 UTC


README

Test

This project is based on the open-source project scito-performance/keycloak-admin .

Installation

composer require overtrue/keycloak-admin

Usage

$client = (new ClientBuilder())
    ->withServerUrl($server)
    ->withRealm($realm)
    ->withClientId($clientId)
    ->withUsername($keycloakUsername)
    ->withPassword($keycloakPassword)
    ->build();

// Add a user
$client->realm('master')
    ->users()
    ->create()
    ->username($username)
    ->password($password)
    ->email($email)
    ->save();

Integration with Laravel

overtrue/laravel-keycloak-admin

License

MIT