定制 darkvirus/oauth-4-laravel 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

darkvirus/oauth-4-laravel

Composer 安装命令:

composer require darkvirus/oauth-4-laravel

包简介

OAuth Service Provider for Laravel 4

README 文档

README

oauth-4-laravel is a simple laravel 4 service provider (wrapper) for Phpvirus/Oauth which provides oAuth support in PHP 5.3+ and is very easy to integrate with any project which requires an oAuth client.

Supported services

The library supports both oAuth 1.x and oAuth 2.0 compliant services. A list of currently implemented services can be found below. More services will be implemented soon.

Included service implementations:

  • OAuth1
    • BitBucket
    • Etsy
    • FitBit
    • Flickr
    • Scoop.it!
    • Tumblr
    • Twitter
    • Xing
    • Yahoo
  • OAuth2
    • Amazon
    • BitLy
    • Box
    • Dailymotion
    • Dropbox
    • Facebook
    • Foursquare
    • GitHub
    • Google
    • Harvest
    • Heroku
    • Instagram
    • LinkedIn
    • Mailchimp
    • Microsoft
    • PayPal
    • Pocket
    • Reddit
    • RunKeeper
    • SoundCloud
    • Stripe
    • Vkontakte
    • Yammer
  • more to come!

To learn more about Phpvirus/Oauth go here

Installation

This library can be found on Packagist. The recommended way to install this is through composer.

Add oauth-4-laravel to your composer.json file:

"require": {
	"phpvirus/oauth": "0.1.*@dev",
	"darkvirus/oauth-4-laravel": "dev-master"
}

And install dependencies:

$ curl -sS https://getcomposer.org/installer | php
$ php composer.phar install

Or Use composer to install this package.

$ composer update

Registering the Package

Register the service provider within the providers array found in app/config/app.php:

'providers' => array(
	// ...
	
	'Darkvirus\OAuth\OAuthServiceProvider'
)

Add an alias within the aliases array found in app/config/app.php:

'aliases' => array(
	// ...
	
	'OAuth' => 'Darkvirus\OAuth\Facade\OAuth',
)

Configuration

There are two ways to configure oauth-4-laravel. You can choose the most convenient way for you. You can use package config file which can be generated through command line by artisan (option 1) or you can simply create a config file called oauth-4-laravel.php in your app\config\ directory (option 2).

Option 1

Create configuration file for package using artisan command

$ php artisan config:publish darkvirus/oauth-4-laravel

Option 2

Create configuration file manually in config directory app/config/oauth-4-laravel.php and put there code from below.

<?php
return array( 
	
	/*
	|--------------------------------------------------------------------------
	| oAuth Config
	|--------------------------------------------------------------------------
	*/

	/**
	 * Storage
	 */
	'storage' => 'Session', 

	/**
	 * Consumers
	 */
	'consumers' => array(

		/**
		 * Stripe
		 */
		'Stripe' => array(
            'client_id' => '',
            'client_secret' => '',
        ),		

	)

);

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-10-27