/** * This method parses the $_POST and $_GET superglobals and looks for * the following information: * 1/ user authentication - username+password or token (wsusername, wspassword and wstoken parameters) * * @return void */ protected function parse_request() { // We are going to clean the POST/GET parameters from the parameters specific to the server. parent::set_web_service_call_settings(); // Get GET and POST paramters. $methodvariables = array_merge($_GET, $_POST); if ($this->authmethod == WEBSERVICE_AUTHMETHOD_USERNAME) { //note: some clients have problems with entity encoding :-( if (isset($methodvariables['wsusername'])) { $this->username = $methodvariables['wsusername']; } if (isset($methodvariables['wspassword'])) { $this->password = $methodvariables['wspassword']; } } else { if (isset($methodvariables['wstoken'])) { $this->token = $methodvariables['wstoken']; } } }
/** * Contructor * @param integer $authmethod authentication method - one of WEBSERVICE_AUTHMETHOD_* */ public function __construct($authmethod, $zend_class) { parent::__construct($authmethod); $this->zend_class = $zend_class; }