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

0.6.0 • Public • Published

register options: { redisIp, redisPort, jwtPublicKey }

while using guard pay attention on order of decorators. Auth guard need to be on bottom, as on example:

@Controller('auth')
@UseGuards(PermissionGuard)
@UseGuards(RoleGuard)
@UseGuards(AuthGuard)
export class AuthController {
    @Get()
    @Permissions('unicorn1')
    @Roles('admin')
    async get(){
        return "Arnold Schwarzenegger and Nicolas Cage are the best actors in the world. Put the coockie down!";
    }
}

Readme

Keywords

none

Package Sidebar

Install

npm i cityride-auth

Weekly Downloads

3

Version

0.6.0

License

MIT

Unpacked Size

946 kB

Total Files

39

Last publish

Collaborators

  • showtime