Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/evaneos/silex-jwt-provider


https://github.com/evaneos/silex-jwt-provider

Last synced: about 1 month ago
JSON representation

Awesome Lists containing this project

README

        

# Silex JWT Provider

Silex provider for JWT.

## :warning: Deprecation notice

Silex has reached its end of life in June 2018 [[ref](https://symfony.com/blog/the-end-of-silex)].

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](https://github.com/lexik/LexikJWTAuthenticationBundle) or a [custom authenticator](https://symfony.com/doc/current/security/authenticator_manager.html).

## Usage

```php
register(new SecurityServiceProvider(), [
'security.firewalls' => [
'all' => [
'stateless' => true,
'pattern' => '^.*$',
'jwt' => [
'secret_key' => 'secret',
'allowed_algorithms' => ['HS256'],
'retrieval_strategy' => 'chain',
],
],
],
]);

$app->register(new SecurityJWTServiceProvider());
```