2017 © Pedro Peláez
 

library oauth2-server-lumen

A Lumen bridge for lucadegasperi/oauth2-server-laravel

image

tiagodsn/oauth2-server-lumen

A Lumen bridge for lucadegasperi/oauth2-server-laravel

  • Monday, June 27, 2016
  • by Tiagodsn
  • Repository
  • 1 Watchers
  • 0 Stars
  • 8 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 21 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

oauth2-server-lumen

A Lumen bridge for lucadegasperi/oauth2-server-laravel., (*1)

Guide

I have written an extensive blog post on it's use here., (*2)

Building a web app with Lumen web API and OAuth2 authentication, (*3)

Installation

Via composer

Run composer require optimus/oauth2-server-lumen 0.1.*, (*4)

Register package

In your bootstrap/app.php register service providers, (*5)

$app->register('LucaDegasperi\OAuth2Server\Storage\FluentStorageServiceProvider');
$app->register('Optimus\OAuth2Server\OAuth2ServerServiceProvider');

... and middleware, (*6)

$app->middleware([
    'LucaDegasperi\OAuth2Server\Middleware\OAuthExceptionHandlerMiddleware'
]);

... and route middleware, (*7)

$app->routeMiddleware([
    'check-authorization-params' => 'Optimus\OAuth2Server\Middleware\CheckAuthCodeRequestMiddleware',
    'csrf' => 'Laravel\Lumen\Http\Middleware\VerifyCsrfToken',
    'oauth' => 'Optimus\OAuth2Server\Middleware\OAuthMiddleware',
    'oauth-owner' => 'Optimus\OAuth2Server\Middleware\OAuthOwnerMiddleware'
]);

Copy config

Copy vendor/lucadegasperi/oauth2-server-laravel/config/oauth2.php to your own config folder (config/oauth2.php in your project root). It has to be the correct config folder as it is registered using $app->configure()., (*8)

Migrate

Run php artisan migrate --path=vendor/lucadegasperi/oauth2-server-laravel/migrations, (*9)

If you get an error saying the Config class can not be found, add class_alias('Illuminate\Support\Facades\Config', 'Config'); to your bootstrap/app.php file and uncomment $app->withFacades(); temporarily to import the migrations., (*10)

Usage

The package is now installed for Lumen. Usage is the same as with lucadegasperi/oauth2-server-laravel, so I suggest you read the wiki for usage., (*11)

The Versions

27/06 2016

dev-master

9999999-dev

A Lumen bridge for lucadegasperi/oauth2-server-laravel

  Sources   Download

The Requires

 

by Tiago Neves

07/05 2015

0.1.2

0.1.2.0

A Lumen bridge for lucadegasperi/oauth2-server-laravel

  Sources   Download

The Requires

 

by Esben Petersen

07/05 2015

0.1.0

0.1.0.0

A Lumen bridge for lucadegasperi/oauth2-server-laravel

  Sources   Download

The Requires

 

by Esben Petersen