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