mobomo/guzzle-azure-hmac-auth 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

mobomo/guzzle-azure-hmac-auth

Composer 安装命令:

composer require mobomo/guzzle-azure-hmac-auth

包简介

Azure HMAC Authentication

README 文档

README

use GuzzleHttp\Client;
use GuzzleHttp\HandlerStack;
use GuzzleHttp\Psr7\Request;
use Mobomo\AzureHmacAuth\AzureHMACMiddleware;

$azureHMACMiddleware = new AzureHMACMiddleware('<secret key>');

$handlerStack = HandlerStack::create();
$handlerStack->push($azureHMACMiddleware, 'hmac-auth');

$resourceEndpoint = "https://<hostname>.communication.azure.com";
$requestPath = "/emails:send?api-version=2023-03-31";
$requestUri = "{$resourceEndpoint}{$requestPath}";

$serializedBody = "<json>";

$client = new Client([
    'handler' => $handlerStack,
]);
$requestMessage = new Request(
    'POST',
    $requestUri,
    array(
        'Content-Type' => 'application/json',
    ),
    $serializedBody
);

$response = $client->send($requestMessage);

统计信息

  • 总下载量: 88.4k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 24
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-06-06