quioteframework/session-gcs
Composer 安装命令:
composer require quioteframework/session-gcs
包简介
Google Cloud Storage session backend for Quiote — a SessionPersistenceInterface implementation for SessionManager, backed by a minimal HMAC-key REST client (no google/cloud-storage dependency).
README 文档
README
Google Cloud Storage session backend for Quiote: a Quiote\Session\SessionPersistenceInterface implementation for Quiote\Session\SessionManager, storing one JSON object per session id in a bucket.
Authenticates with a GCS HMAC key pair (Settings > Interoperability in the Cloud Console, or gcloud storage hmac create) against the XML API — GCS's own S3-compatible auth mode, meant for exactly this kind of tool — instead of a full service-account OAuth2/JWT flow or the google/cloud-storage SDK. If you need IAM-scoped service-account credentials instead of a standalone HMAC key pair, use that SDK instead; this package trades that for a much smaller footprint.
Install
composer require quioteframework/session-gcs
Use
$client = new \Quiote\Storage\Gcs\GcsClient( httpClient: $psr18Client, accessKey: getenv('GCS_HMAC_ACCESS_KEY'), secretKey: getenv('GCS_HMAC_SECRET'), bucket: 'my-app-sessions', ); $manager = new \Quiote\Session\SessionManager( new \Quiote\Storage\Gcs\GcsSessionPersistence($client, objectPrefix: 'sessions/'), );
The bucket must already exist.
License
MIT. See LICENSE.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 1
其他信息
- 授权协议: MIT
- 更新时间: 2026-07-04