payping/oauth2-payping-socialite-client 问题修复 & 功能扩展

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

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

payping/oauth2-payping-socialite-client

Composer 安装命令:

composer require payping/oauth2-payping-socialite-client

包简介

PayPing OAuth2 Provider for Laravel Socialite

README 文档

README

1. Installation

composer require payping/payping-oauth2-socialite-client

2. Service Provider

Remove Laravel\Socialite\SocialiteServiceProvider from your providers[] array in config\app.php if you have added it already. Add php \SocialiteProviders\Manager\ServiceProvider::class to your providers[] array in config\app.php.

For example:

'providers' => [
    // a whole bunch of providers
    // remove 'Laravel\Socialite\SocialiteServiceProvider',
    \SocialiteProviders\Manager\ServiceProvider::class, // add
];
Note: If you would like to use the Socialite Facade, you need to install it.

3. Event Listener

Add SocialiteProviders\Manager\SocialiteWasCalled event to your listen[] array in app/Providers/EventServiceProvider. Add your listeners (i.e. the ones from the providers) to the SocialiteProviders\Manager\SocialiteWasCalled[] that you just created. The listener that you add for this provider is 'SocialiteProviders\PayPing\PayPingExtendSocialite@handle',. Note: You do not need to add anything for the built-in socialite providers unless you override them with your own providers.

For example:

/**
 * The event handler mappings for the application.
 *
 * @var array
 */
protected $listen = [
    \SocialiteProviders\Manager\SocialiteWasCalled::class => [
        // add your listeners (aka providers) here
        'SocialiteProviders\\PayPing\\PayPingExtendSocialite@handle',
    ],
];

4. Configuration setup

You will need to add an entry to the services configuration file so that after config files are cached for usage in production environment (Laravel command artisan config:cache) all config is still available. Add to config/services.php.

'payping' => [
    'client_id' => env('PAYPING_CLIENT_ID'),
    'client_secret' => env('PAYPING_SECRET_ID'),
    'redirect' => env('REDIRECT_URL')
],

5. Usage

Laravel docs on configuration You should now be able to use it like you would regularly use Socialite (assuming you have the facade installed):

return Socialite::with('Payping')->redirect();

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-06-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固