diagvn/gluu-php-sdk 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

diagvn/gluu-php-sdk

最新稳定版本:1.3.10

Composer 安装命令:

composer require diagvn/gluu-php-sdk

包简介

Gluu SDK

README 文档

README

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. License
  6. Contact
  7. Sponsors

About The Project

This library provides some features to connect to Gluu server.

Built With

Laravel

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

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. 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

ricky-morty

Sponsors

diag

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2022-10-06

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固