Shared authentication, HTTP pipeline, API version, ETag, and SAS primitives used by the Azure Storage PHP SDK packages.
[!IMPORTANT] This package is community-maintained and is not affiliated with, endorsed by, or supported by Microsoft.
composer require azure-oss/storage-common
Most applications should install a top-level client package such as azure-oss/storage-blob or azure-oss/storage-queue.
Install azure-oss/storage-common directly when you need low-level storage building blocks such as:
StorageSharedKeyCredentialAccountSasBuilderApiVersionHttpClientOptionsGenerate an account SAS token:
<?php
use AzureOss\Storage\Common\Auth\StorageSharedKeyCredential;
use AzureOss\Storage\Common\Sas\AccountSasBuilder;
$credential = new StorageSharedKeyCredential(
getenv('AZURE_STORAGE_ACCOUNT_NAME'),
getenv('AZURE_STORAGE_ACCOUNT_KEY'),
);
$sas = AccountSasBuilder::new()
->setServices('b')
->setResourceTypes('sco')
->setPermissions('rl')
->setExpiresOn(new DateTimeImmutable('+1 hour'))
->build($credential);
echo $sas;
ApiVersion and ETag value objects used across Storage packagesYou can read the documentation here.
This package is part of the community-maintained PHP OSS for Azure project. It is an independent project and is not affiliated with or endorsed by Microsoft.
This project is released under the MIT License. See LICENSE for details.
How can I help you explore Laravel packages today?