Closed ruslanguns closed 4 years ago
Clonar repositorio git clone -b livecoding/2 https://github.com/ruslanguns/nestjs-myblog.git myblog
git clone -b livecoding/2 https://github.com/ruslanguns/nestjs-myblog.git myblog
Paquetes:
# LOCAL STRATEGY
Estructura de carpetas que usaremos. Configuración básica siguiendo la Documentacion oficial Inyectar PassportModule Crear el provider localStrategy e implementarlo conjunto al servicio Mi primer Custom Decorator para obtener el usuario Inyectar JwtModule Implementar el provider jwtStrategy e implementarlo Método de Login JWT y endpoint profile Error handling con JWT en el Guard Configuración para el Swagger addBearerAuth()
- nest-access-control
Modificación de UserModel para almacenar los roles Creación del archivo app.roles.ts y utilizar builder Inyectar el AccessControlModule en el AppModule Creación del decorador wrapper Implementar lógica de negocio para rutas OWN && ANY Creación de una función para generar un usuario único
Requisitos:
Paquetes:
JWT STRATEGY
Requisitos:
Paquetes:
ROADMAP
Articles to read