evaneos / silex-jwt-provider
Silex JWT Provider
Installs: 15 005
Dependents: 1
Suggesters: 0
Security: 0
Stars: 1
Watchers: 17
Forks: 2
Open Issues: 0
Requires
- php: ^5.5||^7.0
- evaneos/jwt: ^0.5.0
- pimple/pimple: ^3.0
- symfony/security: ^2.7||^3.0||^4.0
Requires (Dev)
- phpspec/phpspec: ^2.0||^3.0||^4.0||^5.0||^6.0||^7.0
- phpunit/phpunit: ^4.0||^5.0||^6.0||^7.0
- silex/silex: ^2.2
- symfony/browser-kit: ^3.0||^4.0
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());