|
@@ -36,7 +36,7 @@ $GLOBALS['pdo']->setAttribute(\PDO::ATTR_ERRMODE, \PDO::ERRMODE_EXCEPTION);
|
|
|
$app = new App();
|
|
$app = new App();
|
|
|
$authJwt = new JwtAuthMiddleware();
|
|
$authJwt = new JwtAuthMiddleware();
|
|
|
|
|
|
|
|
-$app->get('/jwthelloworld', $authJwt,\Controllers\HelloController::class);
|
|
|
|
|
|
|
+$app->post('/verify/jwt', $authJwt,\Controllers\HelloController::class);
|
|
|
|
|
|
|
|
$app->post('/login', \Controllers\LoginController::class);
|
|
$app->post('/login', \Controllers\LoginController::class);
|
|
|
$app->post('/register', $authJwt, \Controllers\RegisterController::class);
|
|
$app->post('/register', $authJwt, \Controllers\RegisterController::class);
|
|
@@ -59,4 +59,6 @@ $app->get('/commodities', $authJwt, \Controllers\CommoditiesGetController::class
|
|
|
// CPR registration
|
|
// CPR registration
|
|
|
$app->post('/cpr/create', $authJwt, \Controllers\RegisterCprController::class);
|
|
$app->post('/cpr/create', $authJwt, \Controllers\RegisterCprController::class);
|
|
|
|
|
|
|
|
|
|
+$app->post('/token/get', $authJwt, \Controllers\TokenGetController::class);
|
|
|
|
|
+
|
|
|
$app->run();
|
|
$app->run();
|