2017 © Pedro Peláez
 

library guzzle-bundle-sastoken-plugin

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

image

moux2003/guzzle-bundle-sastoken-plugin

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

  • Tuesday, February 20, 2018
  • by moux2003
  • Repository
  • 1 Watchers
  • 0 Stars
  • 1 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

GuzzleBundleSasTokenPlugin

Latest Version Software License, (*1)

This plugin integrates SAS Token (Azure) functionality into Guzzle Bundle, a bundle for building RESTful web service clients., (*2)

Requirements

Installation

Using [composer][3]:, (*3)

composer.json

``` json { "require": { "moux2003/guzzle-bundle-sastoken-plugin": "~1.0" } }, (*4)


##### command line ``` bash $ composer require moux2003/guzzle-bundle-sastoken-plugin

Usage

Enable bundle

``` php, (*5)

app/AppKernel.php

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


### Basic configuration ``` yaml # 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

``` php <?php, (*7)

$sasToken = new \Moux2003\GuzzleBundleSasTokenPlugin\Middleware\SasTokenAuthMiddleware($connectionString);, (*8)

$stack = \GuzzleHttp\HandlerStack::create();, (*9)

// Add the sasToken middleware to the handler stack. $stack->push($sasToken->attach());, (*10)

$client = new \GuzzleHttp\Client(['handler' => $stack]); $response = $client->post('https://namespace.windows.net/hubname/messages?api-version=2013-10'); ```, (*11)

License

This middleware is licensed under the MIT License - see the LICENSE file for details, (*12)

The Versions

20/02 2018

dev-master

9999999-dev https://github.com/moux2003/GuzzleBundleSasTokenPlugin

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

  Sources   Download

MIT

The Requires

 

plugin middleware curl framework rest http client web service token http client sas sastoken

20/02 2018

1.0.0

1.0.0.0 https://github.com/moux2003/GuzzleBundleSasTokenPlugin

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

  Sources   Download

MIT

The Requires

 

plugin middleware curl framework rest http client web service token http client sas sastoken