Auth Module Module para projetos NestJS da Luma Systems.
npm i luma-auth-module
Importar os módulos de autenticação e autorização no Controller.
import { MiddlewareConsumer, Module, NestModule } from "@nestjs/common";
import { JwtAuthGuard, Roles } from "luma-auth-module";
@UseGuards(JwtAuthGuard)
@Controller("my-resource")
export class MyController {
@Roles(Roles.SEARCH)
@HttpCode(200)
@Get()
async findAll(): Promise<Object[]> {}
}
# unit tests
npm run test
# e2e tests
npm run test:e2e
# test coverage
npm run test:cov