/** * Verifies whether the post token was set, else dies with error * * @return boolean */ public function verifyRequest() { $checkPost = RequestMethods::issetpost(self::$_tokenname) && $this->isValidToken(RequestMethods::post(self::$_tokenname)); $checkGet = RequestMethods::issetget(self::$_tokenname) && $this->isValidToken(RequestMethods::get(self::$_tokenname)); $this->refreshToken(); if ($checkGet || $checkPost) { return true; } else { return false; } }