private function _denyAccess()
    {
        if (isset($env['auth.JSONerrors']) && $env['auth.JSONerrors'] == true) {
            throw new Exception(
                'Resource '.$this->app->request->getResourceUri().' using '.$this->app->request->getMethod().' method is forbidden',
                403
            );
        } else {
            throw new Exception(
                'You are not authorized to access '.$this->app->request->getResourceUri(),
                403
            );
        }
    }