/** * Handles POST requests * * @param Request $request the HTTP request * @return Illuminate\Http\Response */ public function onPost($door) { // Parses the request and check if it's legit $this->door = $door; $this->extractPayload(); // Process the request $this->logRequest(); $this->onPayload(); // Output return parent::renderReport(); }
/** * Handles POST requests * * @param Request $request the HTTP request */ public function onPost($door) { $this->door = $door; if (!$this->doesServiceExist()) { abort(404, 'Unknown Phabricator instance.'); } $this->extractPayload(); $this->logRequest(); $this->onPayload(); return parent::renderReport(); }
/** * Handles POST requests * * @param Request $request the HTTP request * @return Illuminate\Http\Response */ public function onPost($door) { // Parses the request and check if it's legit $this->door = $door; $this->extractHeaders(); $this->extractPayload(); if (!$this->isLegitRequest()) { abort(403, 'Unauthorized action.'); } if (!$this->isValidRequest()) { abort(400, 'Bad request.'); } // Process the request $this->logGateRequest(); $this->onPayload(); // Output return parent::renderReport(); }