定制 unitedworldwrestling/oauth2-arena 二次开发

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

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

unitedworldwrestling/oauth2-arena

最新稳定版本:1.0.3

Composer 安装命令:

composer require unitedworldwrestling/oauth2-arena

包简介

Arena OAuth 2.0 Client Provider for The PHP League OAuth2-Client

README 文档

README

This package provides Arena OAuth 2.0 support for the PHP League's OAuth 2.0 Client.

Installation

To install, use composer:

composer require unitedworldwrestling/oauth2-arena

Usage

Usage is the same as The League's OAuth client, using \Unitedworldwrestling\OAuth2\Client\Provider\Arena as the provider.

Client Credentials Flow

$provider = new Unitedworldwrestling\OAuth2\Client\Provider\Arena([
    'clientId'          => '{arena-client-id}',
    'clientSecret'      => '{arena-client-secret}',
    'redirectUri'       => 'https://example.com/callback-url',
    'host'              => 'https://api.instagram.com' // Optional, defaults to https://api.instagram.com
]);


// Try to get an access token (using the https://arena.uww.io/grants/api_key grant)
$token = $provider->getAccessToken('https://arena.uww.io/grants/api_key');

// Optional: Now you have a token you can look up a users profile data
try {

    // We got an access token, let's now get the user's details
    $user = $provider->getResourceOwner($token);

    // Use these details to create a new profile
    printf('Hello %s!', $user->getName());

} catch (Exception $e) {

    // Failed to get user details
    exit('Oh dear...');
}

// Use this to interact with an API on the users behalf
echo $token->getToken();

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-07-02

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固