2017 © Pedro Peláez
 

library larav-oauth2-client

This is an simple OAuth client service.

image

ancoka/larav-oauth2-client

This is an simple OAuth client service.

  • Friday, July 20, 2018
  • by ancoka
  • Repository
  • 1 Watchers
  • 3 Stars
  • 42 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

larav-oauth2-client

larav oauth2 client 是一个针对 Laravel framework 实现的一个简单的 进行 OAuth 认证的扩展包。, (*1)

安装

  1. 环境要求 PHP >= 5.6 并且 laravel >= 5.4, (*2)

  2. 安装 larav oauth2 client,只需要添加下面内容到你的 composer.json 文件。然后执行 composer update:, (*3)

    "ancoka/larav-oauth2-client": "1.0.*"
    

    或者直接执行:, (*4)

    composer require "ancoka/larav-oauth2-client:1.0.*"
    
  3. 打开 config/app.php 文件添加下面内容到 providers 数组:, (*5)

    Ancoka\OAuth\OAuthServiceProvider::class,
    
  4. 同样在 config/app.php 文件中添加下面内容到 aliases 数组:, (*6)

    'OAuth' => Ancoka\OAuth\Facades\OAuth::class,
    
  5. 运行如下命令发布扩展包内配置文件 config/oauth_client.php, (*7)

    php artisan vendor:publish --provider="Ancoka\OAuth\OAuthServiceProvider"
    

使用

路由

生成 OAuth 认证路由,执行以下内容:, (*8)

php artisan make:oauth

会在 routes/web.php 文件中添加 OAuth::routes() 。, (*9)

中间件

你可以使用中间件拦截需要进行身份验证的所有路由,类似以下内容:, (*10)

Route::middleware(['oauth.authorize'])->group(function () {
    Route::get('/', 'IndexController@index')->name('home');
});

License

MIT, (*11)

The Versions

20/07 2018

dev-master

9999999-dev

This is an simple OAuth client service.

  Sources   Download

MIT

The Requires

 

by Avatar ancoka

laravel oauth laravel oauth

20/07 2018

1.0.3

1.0.3.0

This is an simple OAuth client service.

  Sources   Download

MIT

The Requires

 

by Avatar ancoka

laravel oauth laravel oauth

20/07 2018

dev-develop

dev-develop

This is an simple OAuth client service.

  Sources   Download

MIT

The Requires

 

by Avatar ancoka

laravel oauth laravel oauth

19/07 2018

1.0.2

1.0.2.0

This is an simple OAuth client service.

  Sources   Download

MIT

The Requires

 

by Avatar ancoka

laravel oauth laravel oauth

05/07 2018

1.0.1

1.0.1.0

This is an simple OAuth client service.

  Sources   Download

MIT

The Requires

 

by Avatar ancoka

laravel oauth laravel oauth

19/06 2018

1.0.0

1.0.0.0

This is an simple OAuth client service.

  Sources   Download

MIT

The Requires

 

by Avatar ancoka

laravel oauth laravel oauth