spomky-labs/lexik-jose-bridge

Bridge to allow the use of web-token/jwt-framework with the Lexik JWT Authentication Bundle


README

Build Status Scrutinizer Code Quality

SensioLabsInsight

Latest Stable Version Total Downloads Latest Unstable Version License

This Symfony Bundle provides a JWT Encoder for the LexikJWTAuthenticationBundle that uses the web-token/jwt-framework as JWT Creator/Loader.

The Release Process

The release process is described here.

Prerequisites

This library needs at least:

  • PHP 7.1+
  • Symfony 3.3+ or 4.0+.

Continuous Integration

It has been successfully tested using PHP 7.1 and PHP 7.2 and nightly.

We also track bugs and code quality using Scrutinizer-CI and Sensio Insight.

Coding Standards are verified by StyleCI.

Code coverage is not performed, but Behavior driven development (BDD) is used to test this bundle.

Installation

Symfony Flex

The preferred way to install this bundle is to rely on Symfony Flex:

composer req "spomky-labs/lexik-jose-bridge:^2.0"

Manual Installation

If you do not use Symfony Flex, then use Composer and install the bundle manually.

composer require spomky-labs/lexik-jose-bridge

Then, add this bundle and the web-token/jwt-framework bundles into your kernel:

<?php

use Symfony\Component\Config\Loader\LoaderInterface;
use Symfony\Component\HttpKernel\Kernel;

class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = [
            ...
            new Jose\Bundle\JoseFramework\JoseFrameworkBundle(),
            new SpomkyLabs\LexikJoseBundle\SpomkyLabsLexikJoseBundle(),
        ];

        return $bundles;
    }
}

Configuration

This bundle needs to be configured. Please see this page to know how to configure it.

How to use

There is nothing to do. Just use your application as usual.

Contributing

Requests for new features, bug fixes and all other ideas to make this library useful are welcome. Please follow these best practices.

Licence

This software is release under MIT licence.