diagvn / gluu-php-sdk
There is no license information available for the latest version (1.3.10) of this package.
Gluu SDK
This package's canonical repository appears to be gone and the package has been frozen as a result. Email us for help if needed.
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
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