luma-auth-module
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

Luma - Auth Module

Auth Module Module para projetos NestJS da Luma Systems.

Sumario

Instalação

npm i luma-auth-module

Modo de uso

JwtAuthGuard e @Roles

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[]> {}
}

Desenvolvimento

Teste

# unit tests
npm run test

# e2e tests
npm run test:e2e

# test coverage
npm run test:cov

Referências

Package Sidebar

Install

npm i luma-auth-module

Weekly Downloads

0

Version

1.0.1

License

UNLICENSED

Unpacked Size

117 kB

Total Files

17

Last publish

Collaborators

  • luma.systems