equal
deleted
inserted
replaced
13 * to license@zend.com so we can send you a copy immediately. |
13 * to license@zend.com so we can send you a copy immediately. |
14 * |
14 * |
15 * @category Zend |
15 * @category Zend |
16 * @package Zend_Service_Amazon |
16 * @package Zend_Service_Amazon |
17 * @subpackage Authentication |
17 * @subpackage Authentication |
18 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
18 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
19 * @license http://framework.zend.com/license/new-bsd New BSD License |
20 */ |
20 */ |
21 |
21 |
22 /** |
22 /** |
23 * @see Zend_Service_Amazon_Authentication |
23 * @see Zend_Service_Amazon_Authentication |
31 |
31 |
32 /** |
32 /** |
33 * @category Zend |
33 * @category Zend |
34 * @package Zend_Service_Amazon |
34 * @package Zend_Service_Amazon |
35 * @subpackage Authentication |
35 * @subpackage Authentication |
36 * @copyright Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com) |
36 * @copyright Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com) |
37 * @license http://framework.zend.com/license/new-bsd New BSD License |
37 * @license http://framework.zend.com/license/new-bsd New BSD License |
38 */ |
38 */ |
39 class Zend_Service_Amazon_Authentication_V2 extends Zend_Service_Amazon_Authentication |
39 class Zend_Service_Amazon_Authentication_V2 extends Zend_Service_Amazon_Authentication |
40 { |
40 { |
41 /** |
41 /** |
45 |
45 |
46 /** |
46 /** |
47 * Signature Encoding Method |
47 * Signature Encoding Method |
48 */ |
48 */ |
49 protected $_signatureMethod = 'HmacSHA256'; |
49 protected $_signatureMethod = 'HmacSHA256'; |
50 |
50 |
51 /** |
51 /** |
52 * Type of http request |
52 * Type of http request |
53 * @var string |
53 * @var string |
54 */ |
54 */ |
55 protected $_httpMethod = "POST"; |
55 protected $_httpMethod = "POST"; |
69 if(!isset($parameters['Timestamp'])) { |
69 if(!isset($parameters['Timestamp'])) { |
70 $parameters['Timestamp'] = gmdate('Y-m-d\TH:i:s\Z', time()+10); |
70 $parameters['Timestamp'] = gmdate('Y-m-d\TH:i:s\Z', time()+10); |
71 } |
71 } |
72 |
72 |
73 $data = $this->_signParameters($url, $parameters); |
73 $data = $this->_signParameters($url, $parameters); |
74 |
74 |
75 return $data; |
75 return $data; |
76 } |
76 } |
77 |
77 |
78 /** |
78 /** |
79 * Set http request type to POST or GET |
79 * Set http request type to POST or GET |
80 * @param $method string |
80 * @param string $method |
81 */ |
81 */ |
82 public function setHttpMethod($method = "POST") { |
82 public function setHttpMethod($method = "POST") { |
83 $this->_httpMethod = strtoupper($method); |
83 $this->_httpMethod = strtoupper($method); |
84 } |
84 } |
85 |
85 |
86 /** |
86 /** |
87 * Get the current http request type |
87 * Get the current http request type |
88 * @return string |
88 * @return string |
89 */ |
89 */ |
90 public function getHttpMethod() |
90 public function getHttpMethod() |