We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This is an example to store blacklisted jwts on Redis.
1- Create a new class with this content
`<?php
namespace Infrastructure\Redis\Jwt;
use Illuminate\Support\Facades\Cache; use Tymon\JWTAuth\Providers\Storage\Illuminate;
class Storage extends Illuminate { public function __construct() { $this->cache = Cache::store('jwt'); } }`
2- Go to app/jwt.php
app/jwt.php
3- Replace 'storage' with the previous namespace class
4- Go to app/cache.php
app/cache.php
5- Create a new connection in 'stores'
'jwt' => [ 'driver' => 'redis', 'connection' => 'jwt', 'lock_connection' => 'default', ],
6- Go to app/database.php
app/database.php
7- Save a new connection in 'redis'
'jwt' => [ 'url' => env('REDIS_URL'), 'host' => env('REDIS_HOST'), 'username' => env('REDIS_USERNAME'), 'password' => env('REDIS_PASSWORD'), 'port' => env('REDIS_PORT'), 'database' => '2', // You can select a specific database ],
8- You should call auth()->logout(true);
The text was updated successfully, but these errors were encountered:
This should be implemented out-of-the-box or at least in the documentation! 💪 🔥
Sorry, something went wrong.
No branches or pull requests
This is an example to store blacklisted jwts on Redis.
1- Create a new class with this content
`<?php
namespace Infrastructure\Redis\Jwt;
use Illuminate\Support\Facades\Cache;
use Tymon\JWTAuth\Providers\Storage\Illuminate;
class Storage extends Illuminate
{
public function __construct()
{
$this->cache = Cache::store('jwt');
}
}`
2- Go to
app/jwt.php
3- Replace 'storage' with the previous namespace class
4- Go to
app/cache.php
5- Create a new connection in 'stores'
'jwt' => [ 'driver' => 'redis', 'connection' => 'jwt', 'lock_connection' => 'default', ],
6- Go to
app/database.php
7- Save a new connection in 'redis'
'jwt' => [ 'url' => env('REDIS_URL'), 'host' => env('REDIS_HOST'), 'username' => env('REDIS_USERNAME'), 'password' => env('REDIS_PASSWORD'), 'port' => env('REDIS_PORT'), 'database' => '2', // You can select a specific database ],
8- You should call auth()->logout(true);
The text was updated successfully, but these errors were encountered: