1. Go to this page and download the library: Download judasprabin/auth-manager 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/ */
use Carsguide\Auth\AuthManager;
use GuzzleHttp\Client;
$auth = new AuthManager(new Client());
$auth = $auth->setAudience('foobar');
$auth->getToken();
use Carsguide\Auth\Facades\AuthManager;
AuthManager::setAudience('foobar')->getToken();
AuthManager::setAudience('foobar')
// By default, JWT will cache for 50 minutes
// If you need to override the default length,
// pass minutes in cache(120) method.
->cache() // or ->cache($minutes = 120)
->getToken();
$this->middleware('auth:listings:read');
$router->get('admin/profile', ['middleware' => 'auth:listings:read', function () {
//
}]);
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.