private function _bCheckClient($fnCheckClient_Callback) { //http://tools.ietf.org/html/rfc6749#section-2.3.1 $client_id = urldecode(Ko_Web_Request::SPhpAuthUser()); $client_secret = urldecode(Ko_Web_Request::SPhpAuthPw()); if (0 === strlen($client_id) || 0 === strlen($client_secret)) { $client_id = $this->_aReq['client_id']; $client_secret = $this->_aReq['client_secret']; } if (0 === strlen($client_id) || 0 === strlen($client_secret)) { return false; } $info = $this->aGetClientInfo($client_id); if (empty($info)) { return false; } if (call_user_func_array($fnCheckClient_Callback, array($client_id, $client_secret))) { $this->_sClientId = $client_id; return true; } return false; }