jasonroyle / li3_jwt
JSON Web Token Session Adapter for Lithium
Installs: 33
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 3
Type:lithium-library
Requires
- php: >=5.4.0
- composer/installers: ~1.0
- firebase/php-jwt: ^2.0
This package is not auto-updated.
Last update: 2024-12-21 17:48:39 UTC
README
Dependencies
- PHP >= 5.4
- firebase/php-jwt
Installation
Composer
composer require jasonroyle/li3_jwt
Enable the Libraries
Make the application aware of the libraries by adding the following to app/config/bootstrap/libraries.php
.
/** * Add some plugins: */ Libraries::add('li3_jwt'); /** * Load composer libraries */ require_once(dirname(LITHIUM_APP_PATH) . '/vendor/autoload.php');
Configuration
Add the following configuration to app/config/bootstrap/session.php
replacing ***SECRET***
with your secret string.
use lithium\storage\Session; Session::config(['default' => [ 'adapter' => 'Token', 'header' => 'Authorization', 'prefix' => 'Bearer ', 'strategies' => ['Jwt' => [ 'secret' => '***SECRET***' ]] ]]);