keiii / silex-apikey-auth
This package is abandoned and no longer maintained.
No replacement package was suggested.
Apikey auth for Silex
dev-master
2018-05-10 10:42 UTC
Requires
- php: >=5.5.9
- lcobucci/jwt: ^3.1
- silex/silex: ^2.0
- symfony/security: ^3.1
Requires (Dev)
- friendsofphp/php-cs-fixer: ^1.11
- phpunit/phpunit: >=4
- raveren/kint: ^1.0
- symfony/browser-kit: ^3.1
This package is not auto-updated.
Last update: 2023-03-15 08:51:51 UTC
README
By default it accept x-access-token header.
Install
composer require keiii/silex-apikey-auth
Registering
$app->register(new \KEIII\SilexApikeyAuth\ApikeyAuthServiceProvider(), [ 'security.firewalls' => [ 'api' => [ 'pattern' => '^/api', 'apikey' => true, 'users' => $app['user_provider'], // ... ], ], // ... ]);
Parameters
- users: Instance of \KEIII\SilexApikeyAuth\Interfaces\ApikeyUserProviderInterface.
- anonymous (optional): http://silex.sensiolabs.org/doc/master/providers/security.html#allowing-anonymous-users.
- extractor (optional): Instance of \KEIII\SilexApikeyAuth\Interfaces\ApikeyExtractorInterface.