Overview

Namespaces

  • Contrib
    • Bundle
      • CoverallsBundle
        • Console
        • Entity
      • CoverallsV1Bundle
        • Api
        • Collector
        • Command
        • Config
        • Entity
          • Git
    • Component
      • File
      • Log
      • System
        • Git
  • Guzzle
    • Batch
      • Exception
    • Cache
    • Common
      • Exception
    • Http
      • Curl
      • Exception
      • Message
      • QueryAggregator
    • Inflection
    • Iterator
    • Log
    • Parser
      • Cookie
      • Message
      • UriTemplate
      • Url
    • Plugin
      • Async
      • Backoff
      • Cache
      • Cookie
        • CookieJar
        • Exception
      • CurlAuth
      • ErrorResponse
        • Exception
      • History
      • Log
      • Md5
      • Mock
      • Oauth
    • Service
      • Builder
      • Command
        • Factory
        • LocationVisitor
          • Request
          • Response
      • Description
      • Exception
      • Resource
    • Stream
  • PHP
  • Psr
    • Log
  • Symfony
    • Component
      • Config
        • Definition
          • Builder
          • Exception
        • Exception
        • Loader
        • Resource
        • Util
      • Console
        • Command
        • Formatter
        • Helper
        • Input
        • Output
        • Tester
      • EventDispatcher
        • Debug
      • Finder
        • Adapter
        • Comparator
        • Exception
        • Expression
        • Iterator
        • Shell
      • Stopwatch
      • Yaml
        • Exception

Classes

  • OauthPlugin
  • Overview
  • Namespace
  • Class
  • Tree
  • Todo

Class OauthPlugin

OAuth signing plugin

Guzzle\Plugin\Oauth\OauthPlugin implements Symfony\Component\EventDispatcher\EventSubscriberInterface
Namespace: Guzzle\Plugin\Oauth
Link: http://oauth.net/core/1.0/#rfc.section.9.1.1
Located at Guzzle/Plugin/Oauth/OauthPlugin.php
Methods summary
public
# __construct( array $config )

Create a new OAuth 1.0 plugin

Create a new OAuth 1.0 plugin

Parameters

$config
array
$config Configuration array containing these parameters: - string 'callback' OAuth callback - string 'consumer_key' Consumer key - string 'consumer_secret' Consumer secret - string 'token' Token - string 'token_secret' Token secret - string 'verifier' OAuth verifier. - string 'version' OAuth version. Defaults to 1.0 - string 'signature_method' Custom signature method - bool 'disable_post_params' Set to true to prevent POST parameters from being signed - array|Closure 'signature_callback' Custom signature callback that accepts a string to sign and a signing key
public static array
# getSubscribedEvents( )

Returns an array of event names this subscriber wants to listen to.

Returns an array of event names this subscriber wants to listen to.

Returns

array
The event names to listen to

Implementation of

Symfony\Component\EventDispatcher\EventSubscriberInterface::getSubscribedEvents()
public array
# onRequestBeforeSend( Guzzle\Common\Event $event )

Request before-send event handler

Request before-send event handler

Parameters

$event
Guzzle\Common\Event
$event Event received

Returns

array
public string
# getSignature( Guzzle\Http\Message\RequestInterface $request, integer $timestamp, string $nonce )

Calculate signature for request

Calculate signature for request

Parameters

$request
Guzzle\Http\Message\RequestInterface
$request Request to generate a signature for
$timestamp
integer
$timestamp Timestamp to use for nonce
$nonce
string
$nonce

Returns

string
public string
# getStringToSign( Guzzle\Http\Message\RequestInterface $request, integer $timestamp, string $nonce )

Calculate string to sign

Calculate string to sign

Parameters

$request
Guzzle\Http\Message\RequestInterface
$request Request to generate a signature for
$timestamp
integer
$timestamp Timestamp to use for nonce
$nonce
string
$nonce

Returns

string
public array
# getParamsToSign( Guzzle\Http\Message\RequestInterface $request, integer $timestamp, string $nonce )

Parameters sorted and filtered in order to properly sign a request

Parameters sorted and filtered in order to properly sign a request

Parameters

$request
Guzzle\Http\Message\RequestInterface
$request Request to generate a signature for
$timestamp
integer
$timestamp Timestamp to use for nonce
$nonce
string
$nonce

Returns

array
public boolean
# shouldPostFieldsBeSigned( mixed $request )

Decide whether the post fields should be added to the base string that Oauth signs. This implementation is correct. Non-conformant APIs may require that this method be overwritten e.g. the Flickr API incorrectly adds the post fields when the Content-Type is 'application/x-www-form-urlencoded'

Decide whether the post fields should be added to the base string that Oauth signs. This implementation is correct. Non-conformant APIs may require that this method be overwritten e.g. the Flickr API incorrectly adds the post fields when the Content-Type is 'application/x-www-form-urlencoded'

Parameters

$request
mixed
$request

Returns

boolean
Whether the post fields should be signed or not
public string
# generateNonce( Guzzle\Http\Message\RequestInterface $request )

Returns a Nonce Based on the unique id and URL. This will allow for multiple requests in parallel with the same exact timestamp to use separate nonce's.

Returns a Nonce Based on the unique id and URL. This will allow for multiple requests in parallel with the same exact timestamp to use separate nonce's.

Parameters

$request
Guzzle\Http\Message\RequestInterface
$request Request to generate a nonce for

Returns

string
public integer
# getTimestamp( Guzzle\Common\Event $event )

Gets timestamp from event or create new timestamp

Gets timestamp from event or create new timestamp

Parameters

$event
Guzzle\Common\Event
$event Event containing contextual information

Returns

integer
protected array
# prepareParameters( array $data )

Convert booleans to strings, removed unset parameters, and sorts the array

Convert booleans to strings, removed unset parameters, and sorts the array

Parameters

$data
array
$data Data array

Returns

array
Properties summary
protected Guzzle\Common\Collection $config
#

Configuration settings

Configuration settings

php-coveralls API documentation generated by ApiGen 2.8.0