PHP code example of polaris / api-keys

1. Go to this page and download the library: Download polaris/api-keys 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/ */

    

polaris / api-keys example snippets


use Polaris\ApiKeys\ApiKeysPlugin;
use Polaris\Audit\AuditPlugin;

$polaris = Polaris::create(new Config(..., plugins: [
    new AuditPlugin(),
    new ApiKeysPlugin(environment: 'live', rotationGrace: 86400, maxPerOwner: 50),
]));