radebatz/silex-jwt-provider

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

Silex JWT Provider

3.0.2 2017-11-02 03:45 UTC

This package is auto-updated.

Last update: 2023-09-27 12:53:18 UTC


README

Silex provider for JWT

Build Status

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());