PHP code example of kynx / mezzio-authentication-apikey
1. Go to this page and download the library: Download kynx/mezzio-authentication-apikey library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
kynx / mezzio-authentication-apikey example snippets
use Kynx\Mezzio\Authentication\ApiKey\ApiKeyAuthentication;
use Mezzio\Authentication\AuthenticationInterface;
use Mezzio\Authentication\UserRepository\PdoDatabase;
use Mezzio\Authentication\UserRepositoryInterface;
return [
'authentication' => [
'api-key' => [
'primary' => [
'prefix' => 'myco_sandbox',
],
],
],
'dependencies' => [
'aliases' => [
AuthenticationInterface::class => ApiKeyAuthentication::class,
UserRepositoryInterface::class => PdoDatabase::class,
],
],
];