rmasters/oauth2-assembla
最新稳定版本:v1.0
Composer 安装命令:
composer require rmasters/oauth2-assembla
包简介
关键字:
README 文档
README
This package provides a simple Assembla provider for The PHP League OAuth2 Client.
## Usage
composer require rmasters/oauth2-assembla
$provider = new Assembla([ 'clientId' => getenv('ASSEMBLA_CLIENT_ID'), 'clientSecret' => getenv('ASSEMBLA_CLIENT_SECRET'), 'redirectUri' => getenv('ASSEMBLA_REDIRECT_URI'), ]); // Send to Assembla for authorization if (!isset($_GET['code'])) { header('Location: ' . $provider->getAuthorizationUrl()); exit; } // Get an access token from an authorization code $token = $provider->getAccessToken('authorization_code', ['code' => $_GET['code']]); $_SESSION['assembla'] = $token; // Get the authenticated user $user = $provider->getResourceOwner($token); assert($user instanceof AssemblaResourceOwner); printf("Logged in as %s", $user->getName());
License
统计信息
- 总下载量: 21
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-11-02