diagvn / gluu-php-sdk
此软件包最新版本(1.3.10)没有提供许可证信息。
Gluu SDK
1.3.10
2023-01-10 10:10 UTC
Requires
- php: ^8.0
- ext-json: *
- guzzlehttp/guzzle: ^7.0
- illuminate/config: *
- illuminate/container: *
- illuminate/contracts: *
- illuminate/support: *
- psr/log: *
- psy/psysh: @stable
- vlucas/phpdotenv: ^5.4
Requires (Dev)
- captainhook/captainhook: ^5.10
- phpunit/phpunit: ^9.5
- squizlabs/php_codesniffer: 3.*
- vimeo/psalm: ^4.24
README
关于项目
此库提供了一些连接到Gluu服务器的功能。
构建工具
安装
composer require diagvn/gluu-php-sdk
php artisan vendor:publish Gluu\Providers\GluuServiceProvider --config
使用
认证
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
注册用户
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
示例
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 } }
贡献
- 分支项目
- 创建你的功能分支(
git checkout -b feature/AmazingFeature
) - 提交你的更改(
git commit -m 'Add some AmazingFeature'
) - 推送到分支(
git push origin feature/AmazingFeature
) - 打开一个拉取请求
许可证
根据MIT许可证分发。有关更多信息,请参阅LICENSE
。
联系方式
Bradley Nguyen - giang.nguyen@diag.vn
Travis Au - toan.au@diag.vn
Duc Bui - duc.bui@diag.vn