PHPackages                             srlopes/laravel-keycloak-admin - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. srlopes/laravel-keycloak-admin

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

srlopes/laravel-keycloak-admin
==============================

This package supports Keycloak administrator client API, authenticating with username and password or using the security key (client\_secret)

0.1.2(5y ago)02.0kMITPHP

Since Oct 23Pushed 5y agoCompare

[ Source](https://github.com/GenesesLopes/laravel-keycloak-admin)[ Packagist](https://packagist.org/packages/srlopes/laravel-keycloak-admin)[ Docs](https://github.com/GenesesLopes/laravel-keycloak-admin)[ RSS](/packages/srlopes-laravel-keycloak-admin/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (6)Used By (0)

Installtion
===========

[](#installtion)

```
composer require srlopes/laravel-keycloak-admin

```

laravel-keycloak-admin
======================

[](#laravel-keycloak-admin)

Add these environment variables to your .env :

```
KEYCLOAK_ADMIN_BASE_URL=http://keycloak-domain.example/auth

KEYCLOAK_ADMIN_REALM_LOGIN=

KEYCLOAK_ADMIN_REALM=

# Choose to fill in user name and password or client_id and client_secret

KEYCLOAK_ADMIN_USERNAME=

KEYCLOAK_ADMIN_PASSWORD=

KEYCLOAK_ADMIN_CLIENT_ID=

KEYCLOAK_ADMIN_CLIENT_SECRET=        # clients -> your_client -> credentials

KEYCLOAK_ADMIN_BASE_URL_REALM=${KEYCLOAK_BASE_URL}/admin/realms/${KEYCLOAK_ADMIN_REALM}

```

Enable realm managment
======================

[](#enable-realm-managment)

Go to `clients -> your_client -> Service Account` then select realm-managment

from Client Roles list and assign realm-admin to client.

available methods :
===================

[](#available-methods-)

Package has provided services as below :

- user
- role
- client
- clientRole
- group (get, update, count, delete, members)

Publish the config file:

```
php artisan vendor:publish --provider="KeycloakAdm\KeycloakAdminServiceProvider"

```

All api's are in `config\keycloakAdmin.php`

For every api just call api name as method on related service .

example:

```
use KeycloakAdm\Facades\KeycloakAdmin;

KeycloakAdm::user()->create([

     'body' => [  // https://www.keycloak.org/docs-api/11.0/rest-api/index.html#_userrepresentation
             'username' => 'foo'
       ]
]);

KeycloakAdmin::user()->all([
     'query' => [
          'email' => 'email@email.com'
     ]
])

KeycloakAdm::user()->update([

     'id' => 'user_id',

     'body' => [  // https://www.keycloak.org/docs-api/11.0/rest-api/index.html#_userrepresentation
             'username' => 'foo'
     ]

]);

KeycloakAdm::role()->get([

     'id' => 'role_id'

]);
```

All other api calls are same as examples just need to see required parameters for every api in

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

3

Last Release

2026d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/66c89326a4b5c5ae994e3857905c2318cc95e1446d5a42430595ca1d71ceaae5?d=identicon)[geneses Lopes](/maintainers/geneses%20Lopes)

---

Top Contributors

[![Mnikoei](https://avatars.githubusercontent.com/u/19962633?v=4)](https://github.com/Mnikoei "Mnikoei (19 commits)")[![GenesesLopes](https://avatars.githubusercontent.com/u/38017840?v=4)](https://github.com/GenesesLopes "GenesesLopes (1 commits)")

---

Tags

laravelkeycloak

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/srlopes-laravel-keycloak-admin/health.svg)

```
[![Health](https://phpackages.com/badges/srlopes-laravel-keycloak-admin/health.svg)](https://phpackages.com/packages/srlopes-laravel-keycloak-admin)
```

###  Alternatives

[robsontenorio/laravel-keycloak-guard

🔑 Simple Keycloak Guard for Laravel

5161.1M3](/packages/robsontenorio-laravel-keycloak-guard)[vizir/laravel-keycloak-web-guard

Simple Keycloak Guard to Laravel Web Routes

166574.1k](/packages/vizir-laravel-keycloak-web-guard)[truckersmp/steam-socialite

Laravel Socialite provider for Steam OpenID.

1516.7k](/packages/truckersmp-steam-socialite)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
