fix
This commit is contained in:
parent
1b6e76cd46
commit
44d5aabd19
|
@ -24,7 +24,7 @@ $normalizedPath = str_replace($basePath, '', $path);
|
||||||
// Enrutamiento
|
// Enrutamiento
|
||||||
switch (true) {
|
switch (true) {
|
||||||
case preg_match('#^/oauth/token#', $normalizedPath):
|
case preg_match('#^/oauth/token#', $normalizedPath):
|
||||||
$authPath = __DIR__ . '/../src/Oauth/Routes/AuthRoutes.php';
|
$authPath = __DIR__ . '/../src/OAuth/Routes/AuthRoutes.php';
|
||||||
|
|
||||||
if (file_exists($authPath)) {
|
if (file_exists($authPath)) {
|
||||||
require_once $authPath;
|
require_once $authPath;
|
||||||
|
@ -42,7 +42,7 @@ switch (true) {
|
||||||
|
|
||||||
case preg_match('#^/candidatos#', $normalizedPath):
|
case preg_match('#^/candidatos#', $normalizedPath):
|
||||||
// Verificar token de OAuth 2.0 antes de acceder a rutas protegidas
|
// Verificar token de OAuth 2.0 antes de acceder a rutas protegidas
|
||||||
require_once __DIR__ . '/../src/Oauth/Middleware/AuthMiddleware.php';
|
require_once __DIR__ . '/../src/OAuth/Middleware/AuthMiddleware.php';
|
||||||
|
|
||||||
// Solo continuamos si el token es válido
|
// Solo continuamos si el token es válido
|
||||||
if (\OAuth\Middleware\AuthMiddleware::verifyToken()) {
|
if (\OAuth\Middleware\AuthMiddleware::verifyToken()) {
|
||||||
|
|
Loading…
Reference in New Issue