diff --git a/authentication.php b/authentication.php index 0bfe467..5c9d301 100644 --- a/authentication.php +++ b/authentication.php @@ -314,22 +314,30 @@ class authentication public function routes () { $authObj = $this; - $this->route->get ("authentication/logout", function () use ($authObj) + $route=$this->route; + $this->route + ->get ("authentication/logout", function () use ($authObj) { $authObj->logout (); - }); + }) - $this->route->get ("authentication(/{url})?", function ($url) use ($authObj) + ->get ("authentication", function () use ($route) + { + $route->redirect ("/authentication/"); + }) + + ->get ("authentication/({url})?", function ($url) use ($authObj) { $authObj->pageHTML ($url); exit; - }); + }) - $this->route->post ("authentication(/{url})?", function ($url) use ($authObj) + ->post ("authentication/({url})?", function ($url) use ($authObj) { $authObj->verifAuthLoginPage ($url); exit; - }); + }) + ; $this->route->authenticationURL = "/authentication/"; }