定制 akamai-open/edgegrid-auth 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

akamai-open/edgegrid-auth

最新稳定版本:2.0.1

Composer 安装命令:

composer require akamai-open/edgegrid-auth

包简介

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

README 文档

README

Akamai EdgeGrid Authentication for PHP

This library requires PHP 8+ and implements the Akamai EdgeGrid Authentication scheme for PHP.

Install

To install, use composer:

$ composer require akamai-open/edgegrid-auth

Alternative installation methods

Single file (PHAR)

Download the PHAR file from the releases page and include it inside your code:

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

// Library is ready to use
```

Clone or download

  1. Either clone or download to pull down a copy of this repository.

  2. Use the composer autoloader and install the dependencies.

      $ composer install
  3. Include the autoloader.

    require_once 'vendor/autoload.php';

    If you don't use the autoloader, include all the required classes manually in your code.

    require_once 'src/Authentication.php';
    require_once 'src/Authentication/Timestamp.php';
    require_once 'src/Authentication/Nonce.php';
    require_once 'src/Authentication/Exception.php';
    require_once 'src/Authentication/Exception/ConfigException.php';
    require_once 'src/Authentication/Exception/SignerException.php';
    require_once 'src/Authentication/Exception/SignerException/InvalidSignDataException.php';

Use

Once you have installed the library, you can create the header value by calling the appropriate \Akamai\Open\Edgegrid\Authentication::set*() methods.

For example, using it with the built-in streams HTTP client might look like the following:

$auth = \Akamai\Open\EdgeGrid\Authentication::createFromEdgeRcFile('default', '/.edgerc');
$auth->setHttpMethod('GET');
$auth->setPath('/identity-management/v3/user-profile');

$context = array(
  'http' => array(
    'header' => array(
      'Authorization: ' . $auth->createAuthHeader(),
      'Content-Type: application/json'
    )
  )
);

$context = stream_context_create($context);

$response = json_decode(file_get_contents('https://' . $auth->getHost() . $auth->getPath(), null, $context));

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 http://www.apache.org/licenses/LICENSE-2.0.

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.

统计信息

  • 总下载量: 3.15M
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 14
  • 点击次数: 3
  • 依赖项目数: 7
  • 推荐数: 0

GitHub 信息

  • Stars: 14
  • Watchers: 10
  • Forks: 14
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固