PHP code example of gielfeldt / jwt-middleware
1. Go to this page and download the library: Download gielfeldt/jwt-middleware 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/ */
gielfeldt / jwt-middleware example snippets
use Gielfeldt\JwtMiddleware\HeaderTokenProvider;
use Gielfeldt\JwtMiddleware\JwtMiddleware;
use Lcobucci\Clock\SystemClock;
use Lcobucci\JWT\Configuration;
use Lcobucci\JWT\Validation\Constraint\StrictValidAt;
use Nyholm\Psr7\Factory\Psr17Factory;
Psr17Factory();
$middleware = new JwtMiddleware($responseFactory, $config, $tokenProvider);