PHPackages                             fengxin2017/oauth - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. fengxin2017/oauth

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

fengxin2017/oauth
=================

a simple oauth for api!

v1.0(6y ago)15MITPHP

Since Aug 20Pushed 6y ago1 watchersCompare

[ Source](https://github.com/fengxin2017/oauth)[ Packagist](https://packagist.org/packages/fengxin2017/oauth)[ RSS](/packages/fengxin2017-oauth/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

 oauth
=======

[](#-oauth-)

 A simple oauth for laravel-project.

简介
--

[](#简介)

> 基于三方登录（微信，微博，QQ，手机）mini-oauth 认证体系。

安装
--

[](#安装)

```
$ composer require fengxin2017/oauth -vvv
```

发布配置
----

[](#发布配置)

```
$ php artisan vendor:publish

```

创建数据库token存储表
-------------

[](#创建数据库token存储表)

```
$ php artisan migrate

```

创建配置中oauth\_model对应的模型
----------------------

[](#创建配置中oauth_model对应的模型)

```
$ php artisan make:model JkbOauthToken

```

如何使用
----

[](#如何使用)

> 比如配置中使用的auth\_middleware\_groups是foo。

> 首先认证模型需要添加Authenticatable，当然你使用laravel自带的Illuminate\\Auth\\Authenticatable也是没问题的。

```
