PHPackages                             mathsalmi/keycloak-guard-bundle - 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. mathsalmi/keycloak-guard-bundle

ActiveSymfony-bundle[Authentication &amp; Authorization](/categories/authentication)

mathsalmi/keycloak-guard-bundle
===============================

Symfony 3.4 guard authentication via keycloak JWT

1.0.0(5y ago)015MITPHPPHP ^7.1

Since Nov 24Pushed 5y ago1 watchersCompare

[ Source](https://github.com/mathsalmi/keycloak-guard-bundle)[ Packagist](https://packagist.org/packages/mathsalmi/keycloak-guard-bundle)[ RSS](/packages/mathsalmi-keycloak-guard-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (4)Versions (2)Used By (0)

Keycloak Symfony Guard Bundle
=============================

[](#keycloak-symfony-guard-bundle)

This package is a fork of [acsystems/keycloak-guard-bundle](https://packagist.org/packages/acsystems/keycloak-guard-bundle) and supports Symfony 3.4.

Original README
---------------

[](#original-readme)

The goal of this bundle is to provide a Keycloak token authenticator guard for Symfony.

[![License](https://camo.githubusercontent.com/88e1dabf4d223df0950e0985948e231325fefca9fa7fe9e446cf8b1c5e9d9e47/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e)](https://camo.githubusercontent.com/88e1dabf4d223df0950e0985948e231325fefca9fa7fe9e446cf8b1c5e9d9e47/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e)[![PHP](https://camo.githubusercontent.com/c37bc56abe535446370c037cfeb6ba7d4810a12c92f6243e42b640270cef2705/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f2533432532462533452d504850253230372e312d626c7565)](https://www.php.net/)[![Code Style](https://camo.githubusercontent.com/9942f05b5e90d789890c18c55d82b24eb32c07cc2effcda8735ab33fadf6a3d6/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f64652532307374796c652d7073722d2d322d6461726b677265656e)](https://www.php-fig.org/psr/psr-2/)

Documentation
-------------

[](#documentation)

### Quick start

[](#quick-start)

#### Installation

[](#installation)

Install the package from packagist using composer

```
composer require acsystems/keycloak-guard-bundle
```

Add the bundle.

`config/bundles.php`

```
return [
    ACSystems\KeycloakGuardBundle\ACSystemsKeycloakGuardBundle::class => ['all' => true]
];
```

Set up Symfony Security to use the custom authenticator.

`config/packages/security.yaml`

```
security:
  providers:
    keycloak:
      id: ACSystems\KeycloakGuardBundle\Security\Provider\KeycloakUserProvider
  firewalls:
    dev:
      pattern: ^/(_(profiler|wdt)|css|images|js)/
      security: false
    main:
      provider: keycloak
      stateless: true
      anonymous: true
      logout: ~

      guard:
        authenticators:
          - ACSystems\KeycloakGuardBundle\Security\KeycloakTokenAuthenticator

  access_control:
    # ...
```

Add your keycloak base url and realm

`config/packages/keycloak_client.yaml:`

```
acsystems_keycloak_guard:
  keycloak_guard:
    base_uri: 'https://example.com/'
    realm: 'example-realm'
```

#### Configurable parameters

[](#configurable-parameters)

NameTypeUsagebase\_uristringURL to your keycloak instancerealmoptional stringRealm name, will be derived if not presentclient\_idoptional stringHuman readable client\_id, will be derived if not present### Upgrading

[](#upgrading)

For version migrations instructions see [upgrade instructions](./UPGRADE.md).

### Supported platforms

[](#supported-platforms)

These are the platforms which are officially supported by this package. Any other versions might work but is not guaranteed.

PlatformVersionPHP7.1 / 7.2 / 7.3### Contributing

[](#contributing)

Please read our [contribution guidelines](./CONTRIBUTING.md) before contributing.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

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

Unknown

Total

1

Last Release

1993d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/664fe4d6203223625e7503923f6154567677e763f014895cb8c1e7e07f79040b?d=identicon)[mathsalmi](/maintainers/mathsalmi)

---

Top Contributors

[![mathsalmi](https://avatars.githubusercontent.com/u/1981698?v=4)](https://github.com/mathsalmi "mathsalmi (7 commits)")[![jannes-io](https://avatars.githubusercontent.com/u/9079379?v=4)](https://github.com/jannes-io "jannes-io (1 commits)")[![kdckrs](https://avatars.githubusercontent.com/u/2227271?v=4)](https://github.com/kdckrs "kdckrs (1 commits)")[![kdsac](https://avatars.githubusercontent.com/u/118351765?v=4)](https://github.com/kdsac "kdsac (1 commits)")[![lisa-wouters](https://avatars.githubusercontent.com/u/167993365?v=4)](https://github.com/lisa-wouters "lisa-wouters (1 commits)")

### Embed Badge

![Health badge](/badges/mathsalmi-keycloak-guard-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/mathsalmi-keycloak-guard-bundle/health.svg)](https://phpackages.com/packages/mathsalmi-keycloak-guard-bundle)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M650](/packages/sylius-sylius)[simplesamlphp/simplesamlphp

A PHP implementation of a SAML 2.0 service provider and identity provider.

1.1k12.4M193](/packages/simplesamlphp-simplesamlphp)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[scheb/2fa

Two-factor authentication for Symfony applications (please use scheb/2fa-bundle to install)

578630.7k1](/packages/scheb-2fa)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)

PHPackages © 2026

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