1. Go to this page and download the library: Download davidxu/yii2-jwt 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/ */
davidxu / yii2-jwt example snippets
'components' => [
'jwt' => [
'class' => \davidxu\jwt\Jwt::class,
'privateKey' => __DIR__ . '/../private.key',
'publicKey' => __DIR__ . '/../public.key',
// A date/time string. Valid formats are explained in
// [Date and Time Formats](https://secure.php.net/manual/en/datetime.formats.php)
'expire_time' => '+2 hour'
],
],