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).
Requires
- php: >=8.5.0
- nyholm/psr7: ^1.8
- psr/http-client: ^1.0
- psr/http-message: ^2.0
- quioteframework/quiote: *
This package is auto-updated.
Last update: 2026-07-05 17:07:49 UTC
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.