SEC-001: migrar HcaptchaGuard a TurnstileGuard con siteverify Cloudflare.
Bypass solo en desarrollo; pruebas y producción validan header turnstile vía HTTPS nativo. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -2,7 +2,7 @@ import { Body, Controller, Get, Post, UseGuards } from '@nestjs/common';
|
||||
import { AuthGuard } from '@nestjs/passport';
|
||||
import { ApiBody, ApiOperation, ApiTags } from '@nestjs/swagger';
|
||||
import { Serealize } from '../interceptors/serialize.interceptor';
|
||||
import { HcaptchaGuard } from '../guards/hcaptcha.guard';
|
||||
import { TurnstileGuard } from '../guards/turnstile.guard';
|
||||
import { AuthService } from './auth.service';
|
||||
import { LoginAdminDto } from './dto/input/login-admin.dto';
|
||||
import { LoginOperadorDto } from './dto/input/login-operador.dto';
|
||||
@@ -15,7 +15,7 @@ export class AuthController {
|
||||
constructor(private authService: AuthService) {}
|
||||
|
||||
@Serealize(AuthTokenOutputDto)
|
||||
@UseGuards(HcaptchaGuard)
|
||||
@UseGuards(TurnstileGuard)
|
||||
@Post('login-admin')
|
||||
@ApiOperation({ description: 'Login del admin.' })
|
||||
@ApiBody({
|
||||
@@ -27,7 +27,7 @@ export class AuthController {
|
||||
}
|
||||
|
||||
@Serealize(AuthTokenOutputDto)
|
||||
@UseGuards(HcaptchaGuard)
|
||||
@UseGuards(TurnstileGuard)
|
||||
@Post('login-operador')
|
||||
@ApiOperation({ description: 'Login del operador.' })
|
||||
@ApiBody({
|
||||
@@ -45,7 +45,7 @@ export class AuthController {
|
||||
}
|
||||
|
||||
@Serealize(AuthTokenOutputDto)
|
||||
@UseGuards(HcaptchaGuard)
|
||||
@UseGuards(TurnstileGuard)
|
||||
@Post('login-usuario')
|
||||
@ApiOperation({ description: 'Login del usuario.' })
|
||||
@ApiBody({
|
||||
|
||||
Reference in New Issue
Block a user