PHPackages                             php-solution/jwt-security-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. php-solution/jwt-security-bundle

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

php-solution/jwt-security-bundle
================================

Symfony bundle for use JWT for authorization, authentication.

v5.1.5(7y ago)346.4kMITPHPPHP &gt;=7.1

Since Jun 15Pushed 7y ago6 watchersCompare

[ Source](https://github.com/php-solution/jwt-security-bundle)[ Packagist](https://packagist.org/packages/php-solution/jwt-security-bundle)[ RSS](/packages/php-solution-jwt-security-bundle/feed)WikiDiscussions v5 Synced 3d ago

READMEChangelogDependencies (8)Versions (22)Used By (0)

JwtSecurityBundle
=================

[](#jwtsecuritybundle)

This bundle allows developer to use JWT for authorization/authentication on api application.

Configuration
-------------

[](#configuration)

Configure JWT in your config.yaml:

```
jwt:
  default_configuration: 'common'
  configurations:
    common:
      asymmetric: true
      signer:
        class: 'Lcobucci\JWT\Signer\Rsa\Sha512'
      signing_key:
        content: 'file://%kernel.project_dir%/etc/jwt/keys/private.pem'
        pass: 'test'
      verification_key:
        content: 'file://%kernel.project_dir%/etc/jwt/keys/public.pub'
  types:
    authentication:
      configuration: 'common'
      exp: 3600
```

Configure authorization JWT in your config.yaml:

```
jwt_security:
  auth_header:
      name: 'Authorization'
      prefix: 'Bearer '
  token_provider:
      token_type: 'authentication'
      claim_user: 'user'
  auth_success_response_builder: 'Core\User\AuthResponseBuilder'
  auth_failure_exceptions:
      - { exception: 'Symfony\Component\Security\Core\Exception\AuthenticationException', message: 'Please check your email and password.' }
```

Configure security in your security.yaml:

```
security:
    providers:
        your_user_provider: # provider name
            ...
    firewalls:
        api_login:
            pattern: '^/login'
            stateless: true
            anonymous: true
            json_login:
                check_path: '/login'
                success_handler: 'jwt_security.security.authorization_handler'
                failure_handler: 'jwt_security.security.authorization_handler'
        api_secured:
            pattern: '^/'
            stateless: true
            provider: 'in_memory_users'
            guard:
                authenticators: ['jwt_security.security.authenticator']
access_control:
    - { path: '^/login', roles: 'IS_AUTHENTICATED_ANONYMOUSLY' }
    - { path: '^/', roles: 'IS_AUTHENTICATED_FULLY' }
```

Add route for check login:

```
api_security:
  resource: '@JwtSecurityBundle/Resources/config/routing.yml'
```

or

```
_jwt_security_login:
    path: '/login'
    defaults: { _controller: 'PhpSolution\JwtSecurityBundle\Controller\SecurityController::loginAction', _format: 'json' }
```

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity25

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 75% 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 ~20 days

Total

21

Last Release

2889d ago

Major Versions

v0.2.3 → v4.0.02017-12-14

v4.x-dev → v5.02018-05-15

### Community

Maintainers

![](https://www.gravatar.com/avatar/49381ba2a061a148b9a6f7b5e80663f17d44f15047bbc5f1f38d13429de60487?d=identicon)[olesav](/maintainers/olesav)

---

Top Contributors

[![kalinick](https://avatars.githubusercontent.com/u/1422388?v=4)](https://github.com/kalinick "kalinick (3 commits)")[![igdr](https://avatars.githubusercontent.com/u/4249152?v=4)](https://github.com/igdr "igdr (1 commits)")

### Embed Badge

![Health badge](/badges/php-solution-jwt-security-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/php-solution-jwt-security-bundle/health.svg)](https://phpackages.com/packages/php-solution-jwt-security-bundle)
```

###  Alternatives

[symfony/security-bundle

Provides a tight integration of the Security component into the Symfony full-stack framework

2.5k181.3M2.2k](/packages/symfony-security-bundle)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M379](/packages/easycorp-easyadmin-bundle)[sulu/sulu

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

1.3k1.4M196](/packages/sulu-sulu)[shopware/storefront

Storefront for Shopware

684.6M217](/packages/shopware-storefront)[contao/core-bundle

Contao Open Source CMS

1231.6M2.7k](/packages/contao-core-bundle)[open-dxp/opendxp

Content &amp; Product Management Framework (CMS/PIM)

9417.2k59](/packages/open-dxp-opendxp)

PHPackages © 2026

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