jasonroyle/li3_jwt

JSON Web Token Session Adapter for Lithium

Installs: 32

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 1

Open Issues: 3

Type:lithium-library

0.0.2 2015-05-18 15:09 UTC

This package is not auto-updated.

Last update: 2024-05-11 14:57:26 UTC


README

Dependencies

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***'
	]]
]]);