authentication : manage correctely the routes (no trailling slash)
git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@3014 bf3deb0d-5f1a-0410-827f-c0cc1f45334c
This commit is contained in:
@@ -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/";
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user