Skip to content

Commit

Permalink
🔨 #270 melhorando
Browse files Browse the repository at this point in the history
  • Loading branch information
bjverde committed Aug 5, 2022
1 parent 6b29405 commit 2d48d4d
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions appexemplo_v2.0/api/routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,16 +82,6 @@
$urlChamada = $urlChamada[0];
$urlChamada = $urlChamada.'api/';

$app->add(Authentication::basicAuth());

/*
$app->add(new Tuupola\Middleware\HttpBasicAuthentication([
"users" => [
"root" => "t00r",
"somebody" => "passw0rd"
]
]));
*/

// Define app routes
$app->get($urlChamada, function (Request $request, Response $response, $args) use ($app) {
Expand All @@ -117,9 +107,14 @@
return $response->withHeader('Content-Type', 'application/json');
});

$app->get('/sysinfo', SysinfoAPI::class . ':getInfo');

//Grupo acesso_menu exige autenticacao
//Entrar na classe Authentication para pegar usuário e senha
$controllerAuthentication = new Authentication($urlChamada);
$controllerAuthentication->addPath('acesso_menu');
$app->add($controllerAuthentication->basicAuth());

$app->get($urlChamada.'sysinfo', SysinfoAPI::class . ':getInfo');
$app->get($urlChamada.'auth', SysinfoAPI::class . ':getInfo');

//--------------------------------------------------------------------
// VIEW: selFilhosMenu
Expand Down

0 comments on commit 2d48d4d

Please sign in to comment.