docchula / vesta-client
Laravel Client Service for Vesta, the MDCU Directory Provider
v1.0.0
2024-04-12 14:55 UTC
Requires
- php: ^8.0
- guzzlehttp/guzzle: ^7.5
- illuminate/contracts: ^9.0|^10.0|^11.0
- illuminate/http: ^9.30|^10.0|^11.0
- lcobucci/jwt: ^5.1.0
- spatie/laravel-package-tools: ^1.14.0
Requires (Dev)
- larastan/larastan: ^2.0.1
- laravel/pint: ^1.0
- nunomaduro/collision: ^6.0|^7.9|^8.1
- orchestra/testbench: ^7.0|^8.0
- pestphp/pest: ^1.0|^2.0
- pestphp/pest-plugin-laravel: ^1.1|^2.0
- phpstan/extension-installer: ^1.1
- phpstan/phpstan-deprecation-rules: ^1.0
- phpstan/phpstan-phpunit: ^1.0
README
Laravel Client Service for Vesta, the MDCU Directory Provider
Installation
You can install the package via composer:
composer require docchula/vesta-client
You can publish the config file with:
php artisan vendor:publish --tag="vesta-client-config"
You should set the following ENV variables:
VESTA_SECRET
- The secret key provided by VestaVESTA_ISSUER
- The issuer URL provided by VestaVESTA_URL
- The URL of the Vesta API (optional)
Usage
$vestaClient = new Docchula\VestaClient(); // or use Laravel's Facade: $response = VestaClient::retrieveStudent($identifier, $userEmail, ['title', 'first_name', 'last_name', 'first_name_en', 'last_name_en', 'email', 'nickname']); if ($response->successful()) { $data = $response->json(); }
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Credits
License
The MIT License (MIT). Please see License File for more information.