- Timestamp:
- 2013/05/02 18:11:36 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_12-dev/data/class/api/SC_Api_Operation.php
r22567 r22796 33 33 34 34 35 class SC_Api_Operation 36 { 35 class SC_Api_Operation { 37 36 38 37 /** API_DEBUG_MODE */ … … 59 58 * @return boolean ログイン情報が有効な場合 true 60 59 */ 61 protected function checkMemberAccount($member_id, $member_password) 62 { 60 protected function checkMemberAccount($member_id, $member_password) { 63 61 $objQuery =& SC_Query_Ex::getSingletonInstance(); 64 62 //パスワード、saltの取得 … … 84 82 * @return boolean ログインに成功した場合 true; 失敗した場合 false 85 83 */ 86 protected function checkCustomerAccount($login_email, $login_password) 87 { 84 protected function checkCustomerAccount($login_email, $login_password) { 88 85 $objCustomer = new SC_Customer_Ex(); 89 86 if ($objCustomer->getCustomerDataFromEmailPass($login_password, $login_email)) { … … 99 96 * @return boolean チェックに成功した場合 true; 失敗した場合 false 100 97 */ 101 protected function checkReferer() 102 { 98 protected function checkReferer() { 103 99 $ret = false; 104 100 if (!SC_Utils_Ex::isBlank($_SERVER['HTTP_REFERER'])) { … … 121 117 * @return boolean 署名認証に成功した場合 true; 失敗した場合 false 122 118 */ 123 protected function checkApiSignature($operation_name, $arrParam, $arrApiConfig) 124 { 119 protected function checkApiSignature($operation_name, $arrParam, $arrApiConfig) { 125 120 if (SC_Utils_Ex::isBlank($arrParam['Signature'])) { 126 121 return false; … … 176 171 * @return boolean チェックに成功した場合 true; 失敗した場合 false 177 172 */ 178 protected function checkIp($operation_name) 179 { 173 protected function checkIp($operation_name) { 180 174 $ret = false; 181 175 $allow_hosts = SC_Api_Utils_Ex::getOperationSubConfig($operation_name, 'allow_hosts'); … … 195 189 * @return string 秘密鍵文字列 196 190 */ 197 protected function getApiSecretKey($access_key) 198 { 191 protected function getApiSecretKey($access_key) { 199 192 $objQuery =& SC_Query_Ex::getSingletonInstance(); 200 193 $secret_key = $objQuery->get('api_secret_key', 'dtb_api_account', 'api_access_key = ? and enable = 1 and del_flg = 0', array($access_key)); … … 209 202 * @return boolean 権限がある場合 true; 無い場合 false 210 203 */ 211 protected function checkOperationAuth($operation_name, &$arrParam, &$arrApiConfig) 212 { 204 protected function checkOperationAuth($operation_name, &$arrParam, &$arrApiConfig) { 213 205 if (SC_Utils_Ex::isBlank($operation_name)) { 214 206 return false; … … 273 265 * @return void 274 266 */ 275 protected function setApiBaseParam(&$objFormParam) 276 { 267 protected function setApiBaseParam(&$objFormParam) { 277 268 $objFormParam->addParam('Operation', 'Operation', STEXT_LEN, 'an', array('EXIST_CHECK', 'GRAPH_CHECK', 'MAX_LENGTH_CHECK')); 278 269 $objFormParam->addParam('Service', 'Service', STEXT_LEN, 'an', array('EXIST_CHECK', 'GRAPH_CHECK', 'MAX_LENGTH_CHECK')); … … 288 279 * @return array(string レスポンス名, array レスポンス配列) 289 280 */ 290 public function doApiAction($arrPost) 291 { 281 public function doApiAction($arrPost) { 292 282 // 実行時間計測用 293 283 $start_time = microtime(true); … … 384 374 * @return array エコー情報配列 (XML用の _attributes 指定入り) 385 375 */ 386 protected function getOperationRequestEcho($arrParam, $start_time) 387 { 376 protected function getOperationRequestEcho($arrParam, $start_time) { 388 377 $arrRet = array( 389 378 'HTTPHeaders' => array('Header' => array('_attributes' => array('Name' => 'UserAgent', … … 400 389 401 390 // TODO: ここらへんは SC_Displayに持って行きたい所だが・・ 402 public function sendApiResponse($type, $response_outer_name, &$arrResponse) 403 { 391 public function sendApiResponse($type, $response_outer_name, &$arrResponse) { 404 392 switch ($type) { 405 393 case 'xml':
Note: See TracChangeset
for help on using the changeset viewer.