Example #1
0
 /**
  * Check authentication
  *
  * @access public
  */
 public function handleAuthentication()
 {
     if (!$this->authentication->isAuthenticated()) {
         if ($this->request->isAjax()) {
             $this->response->text('Not Authorized', 401);
         }
         $this->session['login_redirect'] = $this->request->getUri();
         $this->response->redirect($this->helper->url->to('auth', 'login'));
     }
 }