diff options
Diffstat (limited to 'app/Middleware')
-rw-r--r-- | app/Middleware/AuthenticationMiddleware.php | 6 | ||||
-rw-r--r-- | app/Middleware/PostAuthenticationMiddleware.php | 2 |
2 files changed, 4 insertions, 4 deletions
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; } diff --git a/app/Middleware/PostAuthenticationMiddleware.php b/app/Middleware/PostAuthenticationMiddleware.php index 8287c10e..c1237f47 100644 --- a/app/Middleware/PostAuthenticationMiddleware.php +++ b/app/Middleware/PostAuthenticationMiddleware.php @@ -22,7 +22,7 @@ class PostAuthenticationMiddleware extends BaseMiddleware $ignore = ($controller === 'twofactor' && in_array($action, array('code', 'check'))) || ($controller === 'auth' && $action === 'logout'); if ($ignore === false && $this->userSession->hasPostAuthentication() && ! $this->userSession->isPostAuthenticationValidated()) { - $this->setNextMiddleware(null); + $this->nextMiddleware = null; if ($this->request->isAjax()) { $this->response->text('Not Authorized', 401); |