code16/machina-client
Machina Client
"code16/machina-client" is aimed to be used for implementing client to communicate with JSON APIs protected with the Code16/Machina JWT Token authentication guard. It's a simple wrapper around GuzzleHttp and takes cares of querying/refreshing JWT token for you.
Installation
composer require code16/machina-client
Usage
$client = new \Code16\MachinaClient\MachinaClient;
$client->setBaseUrl("https://example.com/api");
$client->setCredentials([
"client" => "some-client-key",
"secret" => "some-secret-key",
]);
try {
$client->get("/foo"); // ['foo => bar'];
}
catch(\Code16\MachinaClient\Exceptions\InvalidCredentialsException $e)
{
// Incorrect credentials
}
License
(c) 2018 code16.fr
MIT
Related Packages
doctrine/dbal
Powerful PHP database abstraction layer (DBAL) with many features for database s...
637,827,751
9,703
laravel/serializable-closure
Laravel Serializable Closure provides an easy and secure way to serialize closur...
413,412,504
609
nunomaduro/collision
Cli error handling for console/command-line PHP applications.
394,964,158
4,660
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| v3.8 | 8.3.*| | ^11.0| | MIT | |
| v3.7 | ^8.3| | ^11.0| | MIT | |
| v3.6 | ^8.1| | ^10.0| | MIT | |
| v3.5 | ^8.1| | ^10.0| | MIT | |
| v3.4 | ^8.1| | ^10.0| | MIT | |
| v3.3 | ^8.1| | ^10.0 | MIT | |
| v3.2 | ^8.1 | ^9.0 | MIT | |
| v3.1 | ^6.0| | MIT | ||
| v3.0 | ^6.0| | MIT | ||
| v2.3 | ^6.0| | MIT | ||
| v2.2 | ^6.0| | MIT | ||
| v2.1 | ^6.0| | MIT | ||
| v2.0 | ^6.0| | MIT | ||
| v1.7 | 5.6.*| | MIT | ||
| v1.6 | 5.6.*| | MIT | ||
| v1.5 | 5.6.*| | MIT | ||
| v1.4 | 5.6.*| | MIT | ||
| v1.3 | 5.6.*| | MIT | ||
| v1.2 | 5.6.*| | MIT | ||
| v1.1 | 5.6.*| | MIT | ||
| v1.0 | 5.6.*| | MIT |