PHPackages                             pickmap/keycloak-middleware - 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. pickmap/keycloak-middleware

ActiveLibrary

pickmap/keycloak-middleware
===========================

keycloak

0.5.0(2y ago)3543[1 issues](https://github.com/Visapick-Team/laravel-keycloak-middleware/issues)MITPHP

Since Jul 20Pushed 2y ago1 watchersCompare

[ Source](https://github.com/Visapick-Team/laravel-keycloak-middleware)[ Packagist](https://packagist.org/packages/pickmap/keycloak-middleware)[ RSS](/packages/pickmap-keycloak-middleware/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (3)Versions (5)Used By (0)

Keycloak Middleware
===================

[](#keycloak-middleware)

step #1
-------

[](#step-1)

install package with below code

```
composer require pickmap/keycloak-middleware

```

step #2
-------

[](#step-2)

‍‍ Go to ‍‍‍‍‍‍‍`/config/app.php` and put `KeycloakMiddlewareServiceProvider::class` code

```
    'providers' => ServiceProvider::defaultProviders()->merge([
        /*
         * Package Service Providers...
         */
        KeycloakMiddlewareServiceProvider::class,
```

step #3
-------

[](#step-3)

add this command in terminal in your root of project

```
php artisan vendor:publish --tag=keycloak-middleware

```

than add your keycloak public key in `/config/keycloak-middleware.php`

```
return [
    'public_key' => null,
];
```

step #4
-------

[](#step-4)

Now you can check keycloak tokens by installing middleware ‍‍‍`keycloak-middleware` for your route

```
Route::get('/', function () {
    dd(request()->all());
})->middleware('keycloak-middleware');
```

Scope And Role
--------------

[](#scope-and-role)

Also, you can limit the access of users by sending the required scopes or roles

### " \* " means all (role or scope)

[](#---means-all-role-or-scope)

```
Route::group(['prefix' => 'v1','middleware' => 'keycloak-middleware:*,*'],function(){
    #  routes
});

Route::group(['prefix' => 'v1','middleware' => 'keycloak-middleware:admin,*'],function(){
    #  routes
});

Route::group(['prefix' => 'v1','middleware' => 'keycloak-middleware:admin|user,view.profile|send.email'],function(){
    #  routes
});
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance13

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity37

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.

###  Release Activity

Cadence

Every ~17 days

Total

4

Last Release

980d ago

### Community

Maintainers

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

---

Top Contributors

[![SalehiAlireza](https://avatars.githubusercontent.com/u/46676671?v=4)](https://github.com/SalehiAlireza "SalehiAlireza (10 commits)")

---

Tags

phpmiddlewarelaravelLaravel AuthkeycloakMicroservice

### Embed Badge

![Health badge](/badges/pickmap-keycloak-middleware/health.svg)

```
[![Health](https://phpackages.com/badges/pickmap-keycloak-middleware/health.svg)](https://phpackages.com/packages/pickmap-keycloak-middleware)
```

###  Alternatives

[imanghafoori/laravel-masterpass

A minimal yet powerful package to help you easily impersonate your users.

367244.1k](/packages/imanghafoori-laravel-masterpass)[laracraft-tech/laravel-xhprof

Easy XHProf setup to profile your laravel application!

235321.4k](/packages/laracraft-tech-laravel-xhprof)[kompo/kompo

Laravel &amp; Vue.js FullStack Components for Rapid Application Development

11812.4k21](/packages/kompo-kompo)[bavix/laravel-xhprof

Quick profiling of your code for Laravel

22156.6k](/packages/bavix-laravel-xhprof)

PHPackages © 2026

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