PHPackages                             moux2003/guzzle-bundle-sastoken-plugin - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. moux2003/guzzle-bundle-sastoken-plugin

ActiveLibrary[Framework](/categories/framework)

moux2003/guzzle-bundle-sastoken-plugin
======================================

SAS Token Plugin for Guzzle Bundle, a PHP HTTP client library and framework for building RESTful web service clients

1.0.0(8y ago)011MITPHPPHP ^7.0

Since Feb 20Pushed 8y ago1 watchersCompare

[ Source](https://github.com/moux2003/GuzzleBundleSasTokenPlugin)[ Packagist](https://packagist.org/packages/moux2003/guzzle-bundle-sastoken-plugin)[ Docs](https://github.com/moux2003/GuzzleBundleSasTokenPlugin)[ RSS](/packages/moux2003-guzzle-bundle-sastoken-plugin/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (1)Dependencies (6)Versions (2)Used By (0)

GuzzleBundleSasTokenPlugin
==========================

[](#guzzlebundlesastokenplugin)

[![Latest Version](https://camo.githubusercontent.com/ce448488dd01fdc924f64c8f1715130be74596fe6a9bb5c1fc47a31ca475c9c9/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f6d6f7578323030332f47757a7a6c6542756e646c65536173546f6b656e506c7567696e2e7376673f7374796c653d666c61742d737175617265)](https://github.com/moux2003/GuzzleBundleSasTokenPlugin/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)

This plugin integrates [SAS Token](https://docs.microsoft.com/en-us/azure/storage/common/storage-dotnet-shared-access-signature-part-1) (Azure) functionality into Guzzle Bundle, a bundle for building RESTful web service clients.

Requirements
------------

[](#requirements)

- [Guzzle Bundle](https://github.com/8p/EightPointsGuzzleBundle)

### Installation

[](#installation)

Using [composer](https://getcomposer.org/):

##### composer.json

[](#composerjson)

```
{
    "require": {
        "moux2003/guzzle-bundle-sastoken-plugin": "~1.0"
    }
}
```

##### command line

[](#command-line)

```
$ composer require moux2003/guzzle-bundle-sastoken-plugin
```

Usage
-----

[](#usage)

### Enable bundle

[](#enable-bundle)

```
# app/AppKernel.php

new EightPoints\Bundle\GuzzleBundle\EightPointsGuzzleBundle([
    new Moux2003\GuzzleBundleSasTokenPlugin\GuzzleBundleSasTokenPlugin(),
])
```

### Basic configuration

[](#basic-configuration)

```
# app/config/config.yml

eight_points_guzzle:
    clients:
        api_azure:
            base_url: "https://namespace.windows.net"

            # define headers, options

            # plugin settings
            plugin:
                sasToken:
                    connectionString: "Endpoint=scheme://namespace.windows.net/;SharedAccessKeyName=DefaultFullSharedAccessSignature;SharedAccessKey=HaShEdKey"
                    expires: 60 # optional
```

Usage with guzzle
-----------------

[](#usage-with-guzzle)

```
