承接 chrisnharvey/oauth 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

chrisnharvey/oauth

Composer 安装命令:

composer require chrisnharvey/oauth

包简介

Authorize users in your application with multiple OAuth 1.0 and OAuth 2.0 providers

README 文档

README

Build Status

OAuth Composer Package

Authorize users with your application using multiple OAuth 1 and OAuth 2 providers.

Examples

OAuth is split into two sections, clients and providers. A client is an application - perhaps a basic Twitter feed aggregator - which authenticates with an OAuth provider, which in this example would be Twitter itself. You can interact with any provider which is supported in the list below:

  • Appnet
  • Dropbox
  • Facebook
  • Flickr
  • Foursquare
  • GitHub
  • Google
  • Instagram
  • LinkedIn
  • Mailchimp
  • Mailru
  • PayPal
  • Soundcloud
  • Tumblr
  • Twitter
  • Vkontakte
  • Windows Live
  • Yandex
  • YouTube

Usage Example

In this example we will authenticate the user using Twitter.

$provider = \OAuth\OAuth::provider('Twitter', array(
	'id' => 'CLIENT_ID',
	'secret' => 'CLIENT_SECRET',
	'redirect_url' => 'URL_TO_THIS_PAGE'
));

$oauth = $provider->process(function($url, $token = null) {

    if ($token) {
        session_start();
        $_SESSION['token'] = base64_encode(serialize($token));
    }

    header("Location: {$url}");
    exit;

}, function() {

    session_start();
    return unserialize(base64_decode($_SESSION['token']));

});

print_r($oauth->getUserInfo());

If all goes well you should see a dump of user data.

Contribute

  1. Check for open issues or open a new issue for a feature request or a bug
  2. Fork the repository on Github to start making your changes to the develop branch (or branch off of it)
  3. Write a test which shows that the bug was fixed or that the feature works as expected
  4. Send a pull request and bug me until I merge it

统计信息

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

GitHub 信息

  • Stars: 12
  • Watchers: 2
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: dbad-license
  • 更新时间: 2013-02-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固