Skip to content

AzureBlobSessionFactory

session slot factory for AzureBlobSessionPersistence.

yaml session: class: Quiote\Storage\Azure\AzureBlobSessionFactory params: account_name: '%env(AZURE_STORAGE_ACCOUNT)%' account_key: '%env(AZURE_STORAGE_KEY)%' container: quiote-sessions

The %env(NAME)% credentials are read from the process environment when the compiled configuration is loaded, not when it is compiled, so no key is written into the config cache — see EnvPlaceholder.

auth selects how requests are authorized: shared_key (default, needs account_key), workload_identity (AKS, reads the webhook’s own environment variables), cli (a developer’s az login session) or chain (workload identity, falling back to the CLI). Only shared_key ever reads a storage account key.

For small key/value-shaped session payloads AzureTableSessionFactory is cheaper. Bring your own PSR-18 client, bound in the container.

final class AzureBlobSessionFactory implements SessionFactoryInterface

ImplementsSessionFactoryInterface
Since3.0.0
SourceAzureBlobSessionFactory.php
MethodDescription
createPersistence(Context $context, array<string, mixed> $parameters): SessionPersistenceInterfaceBuilds blob-backed session persistence from the slot’s parameters.

public function createPersistence(Context $context, array<string, mixed> $parameters): SessionPersistenceInterface

Builds blob-backed session persistence from the slot’s parameters.

ParameterTypeDescription
$contextContext
$parametersarray``<``string``, ``mixed``>

Returns SessionPersistenceInterface

ThrowsWhen
RuntimeExceptionIf no PSR-18 client is bound in the container.