jaburjak/oauth2-zuul
最新稳定版本:v1.0.0
Composer 安装命令:
composer require jaburjak/oauth2-zuul
包简介
FIT CTU Zuul Provider for the PHP League’s OAuth 2.0 Client.
README 文档
README
This package provides FIT CTU OAuth 2.0 support for the PHP League’s OAuth 2.0 Client.
Requirements
Requires PHP version 7.4 or newer and The League’s OAuth 2.0 Client version 2.
To be able to authenticate users via the FIT CTU Identity Provider, you must create a Client ID and a Client Secret for your application. Follow the official instructions (in Czech) to obtain them.
Installation
Use Composer to install:
$ composer require jaburjak/oauth2-zuul
Usage
The usage is the same as The League’s OAuth client, using \OAuth2Zuul\Provider\Zuul as the provider. For examples, refer to The League’s documentation.
$provider = new OAuth2Zuul\Provider\Zuul([ 'clientId' => '<zuul-client-id>', 'clientSecret' => '<zuul-client-secret>', 'redirectUri' => 'https://example.com/callback-url', // optional 'scopes' => ['cvut:umapi:read'], // optional, value here is the default 'base_url' => 'https://auth.fit.cvut.cz' ]);
Sample project
An opinionated sample project using this package, based on the Symfony framework, showcasing user authentication and accessing CTU APIs, and featuring detailed description of its implementation, is available in the sample subdirectory.
Credits
Support
If you find a bug or encounter any issue, please file an issue.
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 8
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-02-04