PHPackages                             mnikoei/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. mnikoei/laravel-keycloak-admin

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

mnikoei/laravel-keycloak-admin
==============================

This package supports Keycloak admin client api`s

788611PHP

Since Jan 24Pushed 4y ago1 watchersCompare

[ Source](https://github.com/Mnikoei/laravel-keycloak-admin)[ Packagist](https://packagist.org/packages/mnikoei/laravel-keycloak-admin)[ RSS](/packages/mnikoei-laravel-keycloak-admin/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

### Installtion

[](#installtion)

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

```

### Copy the package config to your local config with the publish command:

[](#copy-the-package-config-to-your-local-config-with-the-publish-command)

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

#### laravel-keycloak-admin

[](#laravel-keycloak-admin)

Add these environment variables to your .env :

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

KEYCLOAK_REALM=

KEYCLOAK_REALM_PUBLIC_KEY=     # realm settings -> keys

KEYCLOAK_CLIENT_ID=

KEYCLOAK_CLIENT_SECRET=        # clients -> your_client -> credentials

KEYCLOAK_ADMIN_BASE_URL=${KEYCLOAK_BASE_URL}/admin/realms/${KEYCLOAK_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

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

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

Example:

```
KeycloakAdmin::serviceName()->apiName($parameters)

keycloakAdmin::user()->create([

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

             'username' => 'foo'

       ]

]);

keycloakAdmin::user()->update([

     'id' => 'user_id',

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

             'username' => 'foo'

       ]

]);

keycloakAdmin::role()->get([

     'id' => 'role_id'

]);
```

All other api calls are same as examples just needs to provide required parameters as described in

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/bf2b83707eda47d9441ce0afa49b922f481f187d2ef0f750fdb85b2885786eb1?d=identicon)[Mnikoei](/maintainers/Mnikoei)

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[namshi/jose

JSON Object Signing and Encryption library for PHP.

1.8k99.6M101](/packages/namshi-jose)[league/oauth1-client

OAuth 1.0 Client Library

99698.8M106](/packages/league-oauth1-client)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[league/oauth2-google

Google OAuth 2.0 Client Provider for The PHP League OAuth2-Client

41721.2M118](/packages/league-oauth2-google)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)

PHPackages © 2026

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