PHP code example of kipchak / middleware-auth-key

1. Go to this page and download the library: Download kipchak/middleware-auth-key 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/ */

    

kipchak / middleware-auth-key example snippets


use Kipchak\Middleware\Auth\Key\Handlers\ApiKey;

$client = $request->getAttribute(ApiKey::ATTRIBUTE_CLIENT); // e.g. "client-one"