@tigdevs/thegrey
TypeScript icon, indicating that this package has built-in type declarations

1.0.4 • Public • Published

> Gandalf The Grey will protect your NestJS application from unauthorized users, xss, sqli, nosqli attacks and more.

AuthGuard

import { Controller, Get, HttpCode, UseGuards } from '@nestjs/common'
import { YouShallNotPass } from '@tigdevs/thegrey'
import { AppService } from './app.service'

@Controller('test')
export class AppController {
    constructor(private readonly appService: AppService) {}

    @Get('users')
    @HttpCode(200)
    @UseGuards(YouShallNotPass)
    public listUsers(): Array<Record<string, unknown>> {
        return this.appService.listUsers()
    }
}

Readme

Keywords

none

Package Sidebar

Install

npm i @tigdevs/thegrey

Weekly Downloads

3

Version

1.0.4

License

MIT

Unpacked Size

2.9 MB

Total Files

52

Last publish

Collaborators

  • leoves
  • igor.martins