承接 optimus/oauth2-server-lumen 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

optimus/oauth2-server-lumen

最新稳定版本:0.1.2

Composer 安装命令:

composer require optimus/oauth2-server-lumen

包简介

A Lumen bridge for lucadegasperi/oauth2-server-laravel

README 文档

README

A Lumen bridge for lucadegasperi/oauth2-server-laravel.

Guide

I have written an extensive blog post on it's use here.

Building a web app with Lumen web API and OAuth2 authentication

Installation

Via composer

Run composer require optimus/oauth2-server-lumen 0.1.*

Register package

In your bootstrap/app.php register service providers

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

... and middleware

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

... and route middleware

$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().

Migrate

Run php artisan migrate --path=vendor/lucadegasperi/oauth2-server-laravel/migrations

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.

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.

统计信息

  • 总下载量: 7.94k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 55
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 55
  • Watchers: 7
  • Forks: 17
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2015-05-06