OAuth2 module for the Lumen PHP framework.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.github
config
src
tests
.gitignore
.scrutinizer.yml
.styleci.yml
.travis.yml
CHANGELOG.md
LICENSE
README.md
codeception.yml
composer.json
composer.lock

README.md

Lumen OAuth2

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.