evaneos/silex-jwt-provider

There is no license information available for the latest version (v3.1.0) of this package.

Silex JWT Provider

Installs: 15 616

Dependents: 1

Suggesters: 0

Security: 0

Stars: 1

Watchers: 15

Forks: 2

Open Issues: 0

pkg:composer/evaneos/silex-jwt-provider

v3.1.0 2021-10-12 08:14 UTC

This package is auto-updated.

Last update: 2025-09-12 17:12:44 UTC


README

Silex provider for JWT.

⚠️ Deprecation notice

Silex has reached its end of life in June 2018 [ref].

We will only maintain this package for internal use only. Contributions are no longer accepted.

You are encouraged to use Symfony 4+ and alternatives like lexik/LexikJWTAuthenticationBundle or a custom authenticator.

Usage

<?php
  
use Evaneos\JWT\Silex\Provider\SecurityJWTServiceProvider;
use Silex\Provider\SecurityServiceProvider;
  
$app->register(new SecurityServiceProvider(), [
    'security.firewalls' => [
        'all' => [
            'stateless' => true,
            'pattern' => '^.*$',
            'jwt' => [
                'secret_key' => 'secret',
                'allowed_algorithms' => ['HS256'],
                'retrieval_strategy' => 'chain',
            ],
        ],
    ],
]);
  
$app->register(new SecurityJWTServiceProvider());