devuniverse/api-user-provider-1 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

devuniverse/api-user-provider-1

Composer 安装命令:

composer require devuniverse/api-user-provider-1

包简介

Laravel UserProvider over rest api

README 文档

README

Install

Add repository to composer.json file.

  "repositories": [
      {
        "type": "vcs",
        "url": "https://github.com/cesg/api-user-provider"
      }
    ]

Add composer dependecie

  composer require cesg/api-user-provider

Configuration

publish the config file

  php artisan vendor:publish --provider="Cesg\Auth\Provider\ApiUserServiceProvider" --tag="config"
return [
    'uri' => env('', 'localhost/api/v1/users'),
    'bearer_token' => env('USER_PROVIDER_API_TOKEN', ''),
    'headers' => []
];

Set the driver in auth config file.

return [
    'providers' => [
              'users' => [
                  'driver' => 'api-users',
                  'model' => Cesg\Auth\Provider\User::class,
              ]
          ],
]

If you use laravel/passport need extend the Cesg\Auth\Provider\User and add the trait Laravel\Passport\HasApiTokens and set the provider model to you own class.

  class User extends \Cesg\Auth\Provider\User
  {
      use HasApiTokens;
  }

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-09-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固