akamai / akamaiopen-edgegrid-php-client Goto Github PK
View Code? Open in Web Editor NEWPHP client library for Akamai {OPEN} EdgeGrid Authentication scheme (based on Guzzle)
Home Page: https://techdocs.akamai.com/home
License: Apache License 2.0
PHP client library for Akamai {OPEN} EdgeGrid Authentication scheme (based on Guzzle)
Home Page: https://techdocs.akamai.com/home
License: Apache License 2.0
To Do
We should not extend GuzzleHttp\Client in Akamai\Open\EdgeGrid\Client
There is no timeout in the .edgerc, and the default SLA for our APIs is 300 seconds. Please increase the default timeout appropriately.
This is very important, as I'm getting Travis set up to run our code.
Thanks,
Kirsten
This ticket outlines the plan for release 0.4.0
\Exception
to more appropriate, and package specific exceptions (See #13)->send()
and ->sendAsync()
)I am building an integration module for Drupal 8. Instead of using an .edgrec
file, I am managing configuration using Drupal's configuration API.
When I instantiate the client, I get this exception:
InvalidArgumentException: Middleware not found: history in /Users/cameron.tod/Sites/drupal/vendor/guzzlehttp/guzzle/src/HandlerStack.php on line 220
Here's the code I use to create the client: https://github.com/cam8001/akamai/blob/16/integrate-akamai-library/src/AkamaiClient.php#L44
And here's the line that trips the Exception:
https://github.com/akamai-open/AkamaiOPEN-edgegrid-php/blob/master/src/Client.php#L445
I dont think I'm doing anything wrong. Is this a bug? Is it likely to cause issues down the line?
Just a question - will the PHP client currently support connections via TLS 1.2 out of the box? Thanks very much for your response.
Hi,
the link to the client file phar is wrong in the readme:
"Alternatively, download the PHAR file from the releases page."
Here is the link:
https://github.com/akamai-open/AkamaiOPEN-edgegrid-php/releases/releases - wrong
https://github.com/akamai-open/AkamaiOPEN-edgegrid-php/releases/ - correct
Could you please fix it?
Thanks.
In the Middleware > Authentication Handler section there is an example with a reference to HandlerStack
:
// Create the handler stack
$handlerStack = HandlerStack::create();
This should either reference a namespace import on top, or have a full path to the class name, eg:
// Create the handler stack
$handlerStack = \GuzzleHttp\HandlerStack::create();
Hi!
I'm working with Akamai, but I have a SSL issue with the requests. Normally when doing cURL requests I need to set CURLOPT_SSL_VERIFYPEER to false. My code looks like this:
$client = new Akamai\Open\EdgeGrid\Client([
'base_uri' => "https://".$host
]);
$client->setAuth($client_token, $client_secret, $access_token);
$response = $client->get($options);
And I get the following error message:
Fatal error: Uncaught exception 'GuzzleHttp\Exception\RequestException' with message 'cURL error 60: SSL certificate problem: unable to get local issuer certificate (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)' in phar://....../akamai-open-edgegrid-client-0.4.3.phar/vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php:187
I noticed that this comes from CurlFactory from your Guzzle library, so I checked the project and saw the possibility to do something like this:
$res = $this->client->request('GET', 'https://host', [ 'curl' => [ CURLOPT_SSL_VERIFYPEER => false ], ]);
Is setting CURL options like this possible to do with Akamai-Open?
Or how can I go around this?
Thank you very much for your help! :)
Kind regards,
Juan
We are not able to use this Library since years due to various completely outdated Dependencies and Requirements, so we have to deal with some Tricks in Composer and/or Forks. Nevertheless, we do need some APIs from Akamai, but we are thinking now it would make more sense to just write our own Code for this.
It looks a little sad, that Akamai cannot support this small Library with even one Update in four Years though, so I would like to ask - is there any chance you are updating this Library, so we can use it with PHP8+, Monolog 2+, Guzzle7+ etc again?
Thanks!
My project uses Guzzle 7.2. So I got this error.
$ composer require akamai-open/edgegrid-client
Using version ^1.0 for akamai-open/edgegrid-client
./composer.json has been updated
Running composer update akamai-open/edgegrid-client
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires akamai-open/edgegrid-client ^1.0 -> satisfiable by akamai-open/edgegrid-client[1.0.0].
- akamai-open/edgegrid-client 1.0.0 requires guzzlehttp/guzzle ^6.1.1 -> found guzzlehttp/guzzle[6.1.1, ..., 6.5.5] but the package is fixed to 7.2.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
Is it possible to make it compatible with monolog/monolog 2.x (https://github.com/Seldaek/monolog)
Problem 1
- Root composer.json requires akamai-open/edgegrid-client 2.0.0 -> satisfiable by akamai-open/edgegrid-client[2.0.0].
- akamai-open/edgegrid-client 2.0.0 requires psr/log ^1.0 -> found psr/log[1.0.0, ..., 1.1.4] but it conflicts with your root composer.json require (3.0.0).
Many packages these days use psr/log 3.0, but the current package cannot be used because it does not support psr/log 3.0.
Based on your releases 0.4.5/0.4.6, PHP 5.3+ should be compatible, but the dependencies still require PHP 5.5+ in composer.json. Installing your bundle via composer on a PHP 5.3 server generates an error.
Currently if you make a request to /path?key=value
an invalid signature is produced. This is not the case if you use pass the same query args in as options (e.g. $options['query']['key'] = 'value'
)
Please, PHP 8.2 support
Would you be open to renaming the bin script from http
to something like akamai-open-edgegrid
or akamai-edgegrid
? I would like to package this project for Fedora but bin script http
is too generic to provide at the system level so I will need to rename it when packaging it downstream anyway. I was just wondering if you would be interested in a pull request with a bin script rename as well?
I sometimes recieve this error:
Notice: Use of undefined constant STDERR - assumed 'STDERR' in Akamai\Open\EdgeGrid\Client->getDebugOption() (line 356 of vendor/akamai-open/edgegrid-client/src/Client.php).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.