/** * Handle Unauthenticated access. * * @access protected * @return void */ protected function _handleUnauthenticatedAccess() { header("HTTP/1.0 401 Unauthorized"); $renderer = new TwigRenderer(); $output = $renderer->render('unauth.tmpl', array()); $result = array("code" => "401", "message" => $output); echo parent::encodeData($result); exit; }