From 4eaab1f6da1a56376a840231f7b8a10469308f97 Mon Sep 17 00:00:00 2001 From: Frederic Guillot Date: Sun, 15 May 2016 20:56:01 -0400 Subject: Added unit tests for middleware --- app/Middleware/AuthenticationMiddleware.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/Middleware/AuthenticationMiddleware.php') diff --git a/app/Middleware/AuthenticationMiddleware.php b/app/Middleware/AuthenticationMiddleware.php index a31198a5..c29b7ab6 100644 --- a/app/Middleware/AuthenticationMiddleware.php +++ b/app/Middleware/AuthenticationMiddleware.php @@ -33,7 +33,7 @@ class AuthenticationMiddleware extends BaseMiddleware protected function handleAuthentication() { if (! $this->userSession->isLogged() && ! $this->authenticationManager->preAuthentication()) { - $this->setNextMiddleware(null); + $this->nextMiddleware = null; if ($this->request->isAjax()) { $this->response->text('Not Authorized', 401); @@ -44,10 +44,10 @@ class AuthenticationMiddleware extends BaseMiddleware } } - private function isPublicAccess() + protected function isPublicAccess() { if ($this->applicationAuthorization->isAllowed($this->router->getController(), $this->router->getAction(), Role::APP_PUBLIC)) { - $this->setNextMiddleware(null); + $this->nextMiddleware = null; return true; } -- cgit v1.2.3