2017 © Pedro Peláez
 

library silex-apikey-auth

Apikey auth for Silex

image

keiii/silex-apikey-auth

Apikey auth for Silex

  • Thursday, May 10, 2018
  • by KEIII
  • Repository
  • 1 Watchers
  • 3 Stars
  • 29 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 1 Versions
  • 12 % Grown

The README.md

ApikeyAuthServiceProvider

Build Status, (*1)

By default it accept x-access-token header., (*2)

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.

The Versions