PHP code example of mlipienski / midas

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

    

mlipienski / midas example snippets


// Slim microframework example

$app->add(
    new Midas\AuthorizationMiddleware(
        Midas\Factories\StrategyFactory::use(
            Midas\Strategis\JWTStrategy::class,
            function ($credentials) {
                // your logic
                return true
            }
        )
    )
);