quioteframework/session-azure 问题修复 & 功能扩展

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

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

quioteframework/session-azure

Composer 安装命令:

composer require quioteframework/session-azure

包简介

Azure Blob Storage and Table Storage session backends for Quiote — SessionPersistenceInterface implementations for SessionManager, backed by minimal Shared-Key REST clients (no official SDK dependency).

README 文档

README

Azure session backends for Quiote: two Quiote\Session\SessionPersistenceInterface implementations for Quiote\Session\SessionManager, one on Blob Storage and one on Table Storage. Both are built on minimal hand-rolled REST clients, not an official Azure SDK — Microsoft stopped actively developing the PHP Blob SDK, and the handful of operations a session backend needs don't warrant the dependency weight. Bring your own PSR-18 HTTP client (e.g. Quiote's own Quiote\Http\Client\HttpClient, obtained via HttpClientFactory).

Install

composer require quioteframework/session-azure

Blob Storage: AzureBlobSessionPersistence

Stores one JSON blob per session id in a single container.

$client = new \Quiote\Storage\Azure\AzureBlobClient(
    httpClient: $psr18Client,
    accountName: 'mystorageaccount',
    accountKey: getenv('AZURE_STORAGE_KEY'),
);

$manager = new \Quiote\Session\SessionManager(
    new \Quiote\Storage\Azure\AzureBlobSessionPersistence($client, container: 'quiote-sessions'),
);

Pass endpoint to AzureBlobClient to target Azurite or another Blob-compatible endpoint instead of https://<account>.blob.core.windows.net. The container is created on first save() (idempotent PUT ?restype=container, tolerant of a concurrent creation).

Table Storage: AzureTableSessionPersistence

Cheaper than Blob Storage for small key/value-shaped session payloads, with no per-account container to manage — stores one entity per session id (partition key session, row key the session id) in a single table.

$client = new \Quiote\Storage\Azure\AzureTableClient(
    httpClient: $psr18Client,
    accountName: 'mystorageaccount',
    accountKey: getenv('AZURE_STORAGE_KEY'),
);

$manager = new \Quiote\Session\SessionManager(
    new \Quiote\Storage\Azure\AzureTableSessionPersistence($client, table: 'sessions'),
);

The table is created on first save() (idempotent POST /Tables, tolerant of TableAlreadyExists). Authenticates with the Table service's "Shared Key Lite" scheme — distinct from Blob's "Shared Key" — but the same account name/key pair works for both.

License

MIT. See LICENSE.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-07-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固