dev-master
9999999-dev https://github.com/machina-clientClient package for code16/machina
MIT
The Requires
The Development Requires
by Rémi Collin
laravel api auth jwt
Client package for code16/machina
"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., (*1)
composer require code16/machina-client
$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 }
(c) 2018 code16.fr, (*2)
MIT, (*3)
Client package for code16/machina
MIT
laravel api auth jwt