File indexing completed on 2024-06-09 05:55:28

0001 <?php
0002 /**
0003  * Zend Framework
0004  *
0005  * LICENSE
0006  *
0007  * This source file is subject to the new BSD license that is bundled
0008  * with this package in the file LICENSE.txt.
0009  * It is also available through the world-wide-web at this URL:
0010  * http://framework.zend.com/license/new-bsd
0011  * If you did not receive a copy of the license and are unable to
0012  * obtain it through the world-wide-web, please send an email
0013  * to license@zend.com so we can send you a copy immediately.
0014  *
0015  * @category   Zend
0016  * @package    Zend_Oauth
0017  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
0018  * @license    http://framework.zend.com/license/new-bsd     New BSD License
0019  * @version    $Id$
0020  */
0021 
0022 /** Zend_Oauth_Signature_SignatureAbstract */
0023 // require_once 'Zend/Oauth/Signature/SignatureAbstract.php';
0024 
0025 /**
0026  * @category   Zend
0027  * @package    Zend_Oauth
0028  * @copyright  Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
0029  * @license    http://framework.zend.com/license/new-bsd     New BSD License
0030  */
0031 class Zend_Oauth_Signature_Plaintext extends Zend_Oauth_Signature_SignatureAbstract
0032 {
0033     /**
0034      * Sign a request
0035      *
0036      * @param  array $params
0037      * @param  null|string $method
0038      * @param  null|string $url
0039      * @return string
0040      */
0041     public function sign(array $params, $method = null, $url = null)
0042     {
0043         if ($this->_tokenSecret === null) {
0044             return $this->_consumerSecret . '&';
0045         }
0046         $return = implode('&', array($this->_consumerSecret, $this->_tokenSecret));
0047         return $return;
0048     }
0049 }