Initial Fork
Forked from tuupola/slim-jwt-auth
resolves security* issue but also has breaking changes
Upgrade
- Switch over the package by using the following commands, for now the
namespace is exactly the same.
composer remove tuupola/slim-jwt-auth
composer require jimtools/jwt-auth
- Update the
JwtAuthentication
config to have keys for thesecret
and
algorithm
to have a unique index.
Before
$app->add(new Tuupola\Middleware\JwtAuthentication([
"secret" => "supersecretkeyyoushouldnotcommittogithub",
"algorithm" => ["HS256"]
]));
After
$app->add(new Tuupola\Middleware\JwtAuthentication([
"secret" => ["acme" => "supersecretkeyyoushouldnotcommittogithub"],
"algorithm" => ["acme" => "HS256"],
]));
- (Maybe) If you are using multiple encryption algorithms you will need to add the
kid
to the JWT header.
firebase JWT Docs