nordsoftware/lumen-oauth2

This package is abandoned and no longer maintained. No replacement package was suggested.

OAuth2 module for the Lumen PHP framework.

3.1.1 2017-06-05 15:12 UTC

README

Build Status Coverage Status Code Climate Scrutinizer Code Quality StyleCI Latest Stable Version Total Downloads License

OAuth2 module for the Lumen PHP framework.

Requirements

Usage

Installation

Run the following command to install the package through Composer:

composer require nordsoftware/lumen-oauth2

Install a storage connector by running one of the following commands:

composer require nordsoftware/lumen-oauth2-doctrine

or

composer require nordsoftware/lumen-oauth2-eloquent

or you can build your own.

Configure

Copy the configuration template in config/oauth2.php to your application's config directory and modify according to your needs. For more information see the Configuration Files section in the Lumen documentation.

Bootstrapping

Add the following lines to bootstrap/app.php:

$app->configure('oauth2');

Depending on the storage connector in use, register the correct service provider, e.g.

$app->register(Nord\Lumen\OAuth2\Doctrine\DoctrineServiceProvider::class);

Then the OAuth2 module service provider.

$app->register(Nord\Lumen\OAuth2\OAuth2ServiceProvider::class);

And to use the middleware for authenticating users.

$app->routeMiddleware([
	.....
	Nord\Lumen\OAuth2\Middleware\OAuth2Middleware::class,
]);

Contributing

Please read the guidelines.

License

See LICENSE.