Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Storage Common Laravel Package

azure-oss/storage-common

Community-maintained PHP primitives shared by the Azure Storage SDK packages: shared key authentication, HTTP pipeline middleware, API version and ETag value objects, account SAS builders, and connection string helpers. Most apps should install a top-level client instead.

View on GitHub
Deep Wiki
Context7

Azure Storage Common PHP

Latest Version on Packagist Packagist Downloads

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.

Install

composer require azure-oss/storage-common

When to use this package

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:

  • StorageSharedKeyCredential
  • AccountSasBuilder
  • ApiVersion
  • HttpClientOptions
  • shared middleware and connection string helpers

Quickstart

Generate 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;

Features

  • Shared key authentication primitives for Azure Storage
  • Middleware for request IDs, dates, API version headers, retries, and authorization
  • Account SAS builders and related value objects
  • Connection string and Storage URI helpers
  • Shared ApiVersion and ETag value objects used across Storage packages

Documentation

You can read the documentation here.

Related packages

Maintenance

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.

License

This project is released under the MIT License. See LICENSE for details.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
adachsoft/php-code-style