diagvn/gluu-php-sdk
最新稳定版本:1.3.10
Composer 安装命令:
composer require diagvn/gluu-php-sdk
包简介
Gluu SDK
README 文档
README
About The Project
This library provides some features to connect to Gluu server.
Built With
Installation
composer require diagvn/gluu-php-sdk
php artisan vendor:publish Gluu\Providers\GluuServiceProvider --config
Usage
Authenticate:
public function authenticate( ?string $username, //Password can be null, if password = null, default password = config('gluu.default_password') ?string $password, string $grantType, ?string $scope = null ) : ?array
Register user
public function register( string $username, //Email can be null, if email = null, default email phoneNumber@gluu.diag.vn ?string $email, string $phoneNumber, //Password can be null, if password = null, default password = config('gluu.default_password') ?string $password): mixed
Example:
use Gluu\App\AuthenticationInterface; class AuthController extends Controller { public function __construct( private AuthenticationInterface $authenticationService, ) { } public function index(Request $request) { $this->authenticationService->register( username:$request->username, email: $request->email, phoneNumber: $request->phone_number, password: $request->password ); $result = $this->authenticationService->authenticate( username: $request->username, password: $request->password, grantType: "password", scope: "openid" ); return } }
Contributing
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
License
Distributed under the MIT License. See LICENSE for more information.
Contact
Bradley Nguyen - giang.nguyen@diag.vn
Travis Au - toan.au@diag.vn
Duc Bui - duc.bui@diag.vn
Sponsors
统计信息
- 总下载量: 1.02k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2022-10-06