public function router($method, $params)In case of the REST controller, simply call the parent router() method to process the request.
{
// do some validation here
if ($something_is_true)
{
// call the REST router to process the request
return parent::router($method, $params);
}
// validation failed, return a HTTP 401 and a message
$this->response(array('status'=> 0, 'error'=> 'Not Authorized'), 401);
}
It looks like you're new here. If you want to get involved, click one of these buttons!