oss/libs/guzzle/plugin/Guzzle/Plugin/Oauth/OauthPlugin.php
public function getParamsToSign(RequestInterface $request, $timestamp, $nonce)
    {
        $params = new Collection(array(
            'oauth_consumer_key'     => $this->config['consumer_key'],
            'oauth_nonce'            => $nonce,
            'oauth_signature_method' => $this->config['signature_method'],
            'oauth_timestamp'        => $timestamp,
            'oauth_token'            => $this->config['token'],
            'oauth_version'          => $this->config['version']
        ));
        
        if (array_key_exists('callback', $this->config) == true) {
            $params['oauth_callback'] = $this->config['callback'];
        }
        
        if (array_key_exists('verifier', $this->config) == true) {
            $params['oauth_verifier'] = $this->config['verifier'];
        }

        // Add query string parameters
        $params->merge($request->getQuery());

        // Add POST fields to signing string if required
        if ($this->shouldPostFieldsBeSigned($request))
        {
            $params->merge($request->getPostFields());
        }

        // Sort params
        $params = $params->toArray();
        ksort($params);

        return $params;
    }
public function getParamsToSign(RequestInterface $request, $timestamp, $nonce)
    {
        $params = new Collection(array(
            'oauth_consumer_key'     => $this->config['consumer_key'],
            'oauth_nonce'            => $nonce,
            'oauth_signature_method' => $this->config['signature_method'],
            'oauth_timestamp'        => $timestamp,
            'oauth_token'            => $this->config['token'],
            'oauth_version'          => $this->config['version']
        ));
        
        if (array_key_exists('callback', $this->config) == true) {
            $params['oauth_callback'] = $this->config['callback'];
        }
        
        if (array_key_exists('verifier', $this->config) == true) {
            $params['oauth_verifier'] = $this->config['verifier'];
        }

        // Add query string parameters
        $params->merge($request->getQuery());

        // Add POST fields to signing string if required
        if ($this->shouldPostFieldsBeSigned($request))
        {
            $params->merge($request->getPostFields());
        }

        // Sort params
        $params = $params->toArray();
        ksort($params);

        return $params;
    }
public function getParamsToSign ( RequestInterface $ request , $ timestamp , $ nonce ) { $ params = new Collection ( array ( 'oauth_consumer_key' => $ this -> config [ 'consumer_key' ] , 'oauth_nonce' => $ nonce , 'oauth_signature_method' => $ this -> config [ 'signature_method' ] , 'oauth_timestamp' => $ timestamp , 'oauth_token' => $ this -> config [ 'token' ] , 'oauth_version' => $ this -> config [ 'version' ] ) ) ; if ( array_key_exists ( 'callback' , $ this -> config ) == true ) { $ params [ 'oauth_callback' ] = $ this -> config [ 'callback' ] ; } if ( array_key_exists ( 'verifier' , $ this -> config ) == true ) { $ params [ 'oauth_verifier' ] = $ this -> config [ 'verifier' ] ; } // Add query string parameters $ params -> merge ( $ request -> getQuery ( ) ) ; // Add POST fields to signing string if required if ( $ this -> shouldPostFieldsBeSigned ( $ request ) ) { $ params -> merge ( $ request -> getPostFields ( ) ) ; } // Sort params $ params = $ params -> toArray ( ) ; ksort ( $ params ) ; return $ params ; }
Parameters sorted and filtered in order to properly sign a request

@param RequestInterface $request   Request to generate a signature for
@param integer          $timestamp Timestamp to use for nonce
@param string           $nonce

@return array
Parameters sorted and filtered in order to properly sign a request