douglasdc3 / kong
A Kong API Manager Admin client. Includes Laravel integration.
Installs: 12 971
Dependents: 0
Suggesters: 0
Security: 0
Stars: 25
Watchers: 4
Forks: 13
Open Issues: 1
Requires
- php: ^7.0|^8.0
- guzzlehttp/guzzle: ^6.0|^7.0
- illuminate/contracts: ^5.8|^6.0|^7.0|^8.0|^9.0|^10.0
- illuminate/support: ^5.8|^6.0|^7.0|^8.0|^9.0|^10.0
Requires (Dev)
- mockery/mockery: ^1.0
- phpunit/phpunit: ^6.5 || ^7.0 || ^8.0
- symfony/var-dumper: ^4.0
README
This is laravel package that allows you to integrate with kong. An open source API manager build on NGINX.
Compatibility
Below you'll find package version compatibility with different versions of Kong and supported plugins.
Install
This package requires PHP7.X and Laravel5.6 or higher.
composer require douglasdc3/kong
Usage
This library follows Kong's api.
Example request:
$kong = new Kong(new HttpClient('http://localhost:8001')); $consumer = new Consumer(['username' => 'johndoe', 'custom_id' => 123]); // Creating a new Consumer & add user to admin acl group in kong $kong->consumers()->create($consumer)->acl()->create('admin');
Planned development
- Missing plugins.
- More tests.
Testing & local development
The integration test use docker behind the scenes. Run the tests with:
vendor/bin/phpunit