|
@@ -11,6 +11,7 @@ namespace Luticate\Auth\Business;
|
11
|
11
|
use Illuminate\Http\Request;
|
12
|
12
|
use Luticate\Auth\DBO\LuticatePermissions;
|
13
|
13
|
use Luticate\Auth\DBO\LuticateUsersDbo;
|
|
14
|
+use Luticate\Doc\Business\LuDocBusiness;
|
14
|
15
|
use Luticate\Utils\LuController;
|
15
|
16
|
use Luticate\Utils\LuRoute;
|
16
|
17
|
|
|
@@ -31,11 +32,9 @@ class LuticateBusiness
|
31
|
32
|
self::$_currentUser = $user;
|
32
|
33
|
}
|
33
|
34
|
|
34
|
|
- /**
|
35
|
|
- * @param $route LuRoute
|
36
|
|
- */
|
37
|
|
- public static function setupAuth($route)
|
|
35
|
+ public static function setupAuth()
|
38
|
36
|
{
|
|
37
|
+ $route = LuRoute::getInstance();
|
39
|
38
|
$route->addMiddleware('Luticate\Auth\Business\LuticateMiddleware');
|
40
|
39
|
}
|
41
|
40
|
|
|
@@ -58,6 +57,8 @@ class LuticateBusiness
|
58
|
57
|
|
59
|
58
|
$route = LuRoute::getInstance();
|
60
|
59
|
|
|
60
|
+ LuDocBusiness::setupRoutes("$prefix/doc");
|
|
61
|
+
|
61
|
62
|
$route->post("$prefix/users/login", "${ns}LuticateUsersBusiness", "login");
|
62
|
63
|
$route->post("$prefix/users/logout", "${ns}LuticateUsersBusiness", "logout");
|
63
|
64
|
$route->post("$prefix/users/$id", "${ns}LuticateUsersBusiness", "getById", LuticatePermissions::USER_GET);
|