2017 © Pedro Peláez
 

library silex-provider-jwt-auth

Provides a jwt_issuer firewall and JWT decoder.

image

linkorb/silex-provider-jwt-auth

Provides a jwt_issuer firewall and JWT decoder.

  • Friday, April 6, 2018
  • by joostfaassen
  • Repository
  • 4 Watchers
  • 0 Stars
  • 35 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 16 Versions
  • 0 % Grown

The README.md

linkorb/silex-provider-jwt-auth

Provides a firewall which uses, as its authentication provider, an issuer of Json Web Tokens., (*1)

Install

Install using composer:-, (*2)

$ composer require linkorb/silex-provider-jwt-auth

Note: use the v1 branch when you're restricted to using version 2.7.x of symfony/security., (*3)

Then configure and register the provider along with the Silex Session and Security providers:-, (*4)

// app/app.php
use LinkORB\JwtAuth\Provider\JwtAuthenticatorServiceProvider;
use Silex\Provider\SecurityServiceProvider;
use Silex\Provider\SessionServiceProvider;
...
$app->register(new SessionServiceProvider);
$app->register(
    new SecurityServiceProvider,
    [
        'security.firewalls' => [
            'my_firewall' => [
                'pattern' => '^/secure-area',
                'stateless' => false,
                'jwt_issuer' => [
                    'app_identifier' => 'my-app-name',
                    'jwt_issuer_url' => 'https://example.com/issue/a/jwt',
                    // see JwtAuthenticatorServiceProvider for more options
                ],
                'users' => function () use ($app) {
                    return $app['my_user_provider'];
                },
            ],
        ],
    ]
);
$app->register(
    new JwtAuthenticatorServiceProvider,
    [
        'jwt_auth.decoder.config' => [
            'decoder_key' => function () {
                return file_get_contents('/path/to/jwt/decoder/key.pub');
            },
            'permitted_algos' => ['RS256', 'RS384', 'RS512'],
        ],
    ]
);

The Versions

06/04 2018

dev-master

9999999-dev

Provides a jwt_issuer firewall and JWT decoder.

  Sources   Download

MIT

The Requires

 

by LinkORB

06/04 2018

v2.4.0

2.4.0.0

Provides a jwt_issuer firewall and JWT decoder.

  Sources   Download

MIT

The Requires

 

by LinkORB

12/11 2017

v2.x-dev

2.9999999.9999999.9999999-dev

Provides a jwt_issuer firewall and JWT decoder.

  Sources   Download

MIT

The Requires

 

by LinkORB

12/11 2017

v2.3.0

2.3.0.0

Provides a jwt_issuer firewall and JWT decoder.

  Sources   Download

MIT

The Requires

 

by LinkORB

11/11 2017

v2.2.0

2.2.0.0

Provides a jwt_issuer firewall and JWT decoder.

  Sources   Download

MIT

The Requires

 

by LinkORB

11/11 2017

v2.1.1

2.1.1.0

Provides a jwt_issuer firewall and JWT decoder.

  Sources   Download

MIT

The Requires

 

by LinkORB

08/11 2017

v2.1.0

2.1.0.0

Provides a jwt_issuer firewall and JWT decoder.

  Sources   Download

MIT

The Requires

 

by LinkORB

06/11 2017

v2.0.1

2.0.1.0

Provides a jwt_issuer firewall and JWT decoder.

  Sources   Download

MIT

The Requires

 

by LinkORB

06/11 2017

v1.x-dev

1.9999999.9999999.9999999-dev

Provides a jwt_issuer firewall and JWT decoder.

  Sources   Download

MIT

The Requires

 

by LinkORB

06/11 2017

v1.1.3

1.1.3.0

Provides a jwt_issuer firewall and JWT decoder.

  Sources   Download

MIT

The Requires

 

by LinkORB

05/09 2017

v1.1.2

1.1.2.0

Provides a jwt_issuer firewall and JWT decoder.

  Sources   Download

MIT

The Requires

 

by LinkORB

12/07 2017

2.0

2.0.0.0

Provides a jwt_issuer firewall and JWT decoder.

  Sources   Download

MIT

The Requires

 

by LinkORB

12/07 2017

1.1.1

1.1.1.0

Provides a jwt_issuer firewall and JWT decoder.

  Sources   Download

MIT

The Requires

 

by LinkORB

04/07 2017

1.1

1.1.0.0

Provides a jwt_issuer firewall and JWT decoder.

  Sources   Download

MIT

The Requires

 

by LinkORB

03/07 2017

1.0.1

1.0.1.0

Provides a jwt_issuer firewall and JWT decoder.

  Sources   Download

MIT

The Requires

 

by LinkORB

02/07 2017

1.0

1.0.0.0

Provides a jwt_issuer firewall and JWT decoder.

  Sources   Download

MIT

The Requires

 

by LinkORB