PHPackages                             dksdev01/edgegrid-client - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. dksdev01/edgegrid-client

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

dksdev01/edgegrid-client
========================

Implements the Akamai {OPEN} EdgeGrid Authentication specified by https://developer.akamai.com/introduction/Client\_Auth.html

043.0k↓41.5%PHP

Since Feb 24Pushed 3y agoCompare

[ Source](https://github.com/dksdev01/AkamaiOPEN-edgegrid-php-client)[ Packagist](https://packagist.org/packages/dksdev01/edgegrid-client)[ RSS](/packages/dksdev01-edgegrid-client/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

akamai-open/edgegrid-client
===========================

[](#akamai-openedgegrid-client)

[Akamai EdgeGrid Authentication](https://techdocs.akamai.com/developer/docs/set-up-authentication-credentials) for PHP

This library requires PHP 8+ and implements the Akamai EdgeGrid Authentication scheme on top of [Guzzle](https://github.com/guzzle/guzzle) as both a drop-in replacement client and middleware.

Installation
------------

[](#installation)

To install, use [`composer`](http://getcomposer.org):

```
$ composer require akamai-open/edgegrid-client
```

### Alternative installation method

[](#alternative-installation-method)

Download the PHAR file from the [releases](https://github.com/akamai/AkamaiOPEN-edgegrid-php/releases) page and include it inside your code:

```
```php
include 'akamai-open-edgegrid-auth.phar';

// Library is ready to use
```

```

Use
---

[](#use)

The `Akamai\Open\EdgeGrid\Client` extends `\GuzzleHttp\Client` as a drop-in replacement. It works transparently to sign API requests without changing other ways you use Guzzle.

To use the client, call `\Akamai\Open\EdgeGrid\Client->setAuth()` or provide an instance of `\Akamai\Open\EdgeGrid\Authentication` to the constructor prior to making a request to an API.

```
$client = new Akamai\Open\EdgeGrid\Client([
  'base_uri' => 'https://akab-h05tnam3wl42son7nktnlnnx-kbob3i3v.luna.akamaiapis.net'
]);

$client->setAuth($client_token, $client_secret, $access_token);

// use $client just as you would \Guzzle\Http\Client
$response = $client->get('/identity-management/v3/user-profile');
```

Authentication
--------------

[](#authentication)

To generate your credentials, see [Create authentication credentials](https://techdocs.akamai.com/developer/docs/set-up-authentication-credentials).

We recommend using a local `.edgerc` authentication file. Place your credentials under a heading of `[default]` at your local home directory or the home directory of a web-server user.

```
[default]
client_secret = C113nt53KR3TN6N90yVuAgICxIRwsObLi0E67/N8eRN=
host = akab-h05tnam3wl42son7nktnlnnx-kbob3i3v.luna.akamaiapis.net
access_token = akab-acc35t0k3nodujqunph3w7hzp7-gtm6ij
client_token = akab-c113ntt0k3n4qtari252bfxxbsl-yvsdj

```

You can call your `.edgerc` file one of two ways:

- Use the factory method `\Akamai\Open\EdgeGrid\Client::createFromEdgeRcFile()`.

    ```
    $client = \Akamai\Open\EdgeGrid\Client::createFromEdgeRcFile();

    // use $client just as you would \Guzzle\Http\Client
    $response = $client->get('/identity-management/v3/user-profile');
    ```
- Specify a credentials section and/or `.edgerc` location:

    ```
    $client = \Akamai\Open\EdgeGrid\Client::createFromEdgeRcFile('example', '../config/.edgerc');

    // use $client just as you would \Guzzle\Http\Client
    $response = $client->get('/identity-management/v3/user-profile');
    ```

Command line interface
----------------------

[](#command-line-interface)

This library provides a command line interface (CLI) with a limited set of capabilities that mimic [httpie](http://httpie.org).

### Install

[](#install)

Install the CLI with composer `vendor/bin/http` or execute the PHAR file.

```
# Composer installed
$ ./vendor/bin/http --help

# For Windows
> php ./vendor/bin/http --help

# PHAR download
php akamai-open-edgegrid-client.phar --help
```

### Arguments

[](#arguments)

You can set authentication and specify an HTTP method (case insensitive), its headers, and any JSON body fields.

> **Note:** Our CLI shows all HTTP and body data. JSON is formated.

ArgumentDescription`--auth-type={edgegrid,basic,digest}`Set the authentication type. The default is `none`.`--auth user:` or `--a user:`Set the `.edgerc` section to use. Unlike `httpie-edgegrid`, the colon (`:`) is optional.`Header-Name:value`Headers and values are colon (`:`) separated.`jsonKey=value`Sends `{"jsonKey": "value"}` in the `POST` or `PUT` body. This will also automatically set the `Content-Type` and `Accept` headers to `application/json`.`jsonKey:=[1,2,3]`Allows you to specify raw JSON data, sending `{"jsonKey": [1, 2, 3]}` in the body.### Limitations

[](#limitations)

- You cannot send `multipart/mime` (file upload) data.
- Client certs are not supported.
- Server certs cannot be verified.
- Output cannot be customized.
- Responses are not syntax highlighted.

Guzzle Middleware
-----------------

[](#guzzle-middleware)

This package provides three different middleware handlers you can add transparently when using the `Client`, to a standard `\GuzzleHttp\Client` or as a handler.

- The `\Akamai\Open\EdgeGrid\Handler\Authentication` for transparent API request signing.
- The `\Akamai\Open\EdgeGrid\Handler\Verbose` for output (or log) responses.
- The `\Akamai\Open\EdgeGrid\Handler\Debug` for output (or log) errors.

### Transparent Use

[](#transparent-use)

HandlerCall`Authentication``Client->setAuthentication()` or pass in an instance of `\Akamai\EdgeGrid\Authentication` to `Client->__construct()`.`Verbose``Client->setInstanceVerbose()` or `Client::setVerbose()` passing in on of `true`Debug``Client->setInstanceDebug()`, `Client::setDebug()`, or set the `debug` config option with `true### Middleware

[](#middleware)

   Handler Example     Authentication ```
// Create the Authentication Handler
$auth = \Akamai\Open\EdgeGrid\Handler\Authentication::createFromEdgeRcFile();
// or:
$auth = new \Akamai\Open\EdgeGrid\Handler\Authentication;
$auth->setAuth($client_token, $client_secret, $access_token);
// Create the handler stack
$handlerStack = \GuzzleHttp\HandlerStack::create();
// Add the Auth handler to the stack
$handlerStack->push($auth);
// Add the handler to a regular \GuzzleHttp\Client
$guzzle = new \GuzzleHttp\Client([
"handler" => $handlerStack
]);
```

Verbose```
// Create the handler stack
$handlerStack = HandlerStack::create();

// Add the Auth handler to the stack
$handlerStack->push(new \Akamai\Open\EdgeGrid\Handler\Verbose());

// Add the handler to a regular \GuzzleHttp\Client
$guzzle = new \GuzzleHttp\Client([
    "handler" => $handlerStack
]);
```

```

  Debug

```

```
// Create the handler stack
$handlerStack = HandlerStack::create();

// Add the Auth handler to the stack
$handlerStack->push(new \Akamai\Open\EdgeGrid\Handler\Debug());

// Add the handler to a regular \GuzzleHttp\Client
$guzzle = new \GuzzleHttp\Client([
    "handler" => $handlerStack
]);
```

```

```

 License
-------

[](#license)

Copyright © 2022 Akamai Technologies, Inc. All rights reserved

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at .

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity23

Early-stage or recently created project

 Bus Factor1

Top contributor holds 92.2% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/a8261dd05f612ab3ad667582d04b15f1a467589767d84f171282ac6ea7c013b6?d=identicon)[dksdev01](/maintainers/dksdev01)

---

Top Contributors

[![dshafik](https://avatars.githubusercontent.com/u/58074?v=4)](https://github.com/dshafik "dshafik (154 commits)")[![synedra](https://avatars.githubusercontent.com/u/77410784?v=4)](https://github.com/synedra "synedra (5 commits)")[![dksdev01](https://avatars.githubusercontent.com/u/19617912?v=4)](https://github.com/dksdev01 "dksdev01 (4 commits)")[![skearney-akamai](https://avatars.githubusercontent.com/u/112410677?v=4)](https://github.com/skearney-akamai "skearney-akamai (1 commits)")[![mgwoj](https://avatars.githubusercontent.com/u/32574975?v=4)](https://github.com/mgwoj "mgwoj (1 commits)")[![hokamoto](https://avatars.githubusercontent.com/u/1726523?v=4)](https://github.com/hokamoto "hokamoto (1 commits)")[![siwinski](https://avatars.githubusercontent.com/u/1034024?v=4)](https://github.com/siwinski "siwinski (1 commits)")

### Embed Badge

![Health badge](/badges/dksdev01-edgegrid-client/health.svg)

```
[![Health](https://phpackages.com/badges/dksdev01-edgegrid-client/health.svg)](https://phpackages.com/packages/dksdev01-edgegrid-client)
```

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[gesdinet/jwt-refresh-token-bundle

Implements a refresh token system over Json Web Tokens in Symfony

70516.4M35](/packages/gesdinet-jwt-refresh-token-bundle)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)[beatswitch/lock

A flexible, driver based Acl package for PHP 5.4+

870304.7k2](/packages/beatswitch-lock)[amocrm/amocrm-api-library

amoCRM API Client

182728.5k6](/packages/amocrm-amocrm-api-library)[vonage/jwt

A standalone package for creating JWTs for Vonage APIs

424.1M4](/packages/vonage-jwt)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
