- import AuthModule in the module where routes guarding is being used
- Exemples:
@hasRoles(UserRole.CLIENT,UserRole.ADMIN)
@UseGuards(JwtAuthGuard,RolesGuard)
only client or admin can access the protected resource
@hasRoles(UserRole.OWNER)
@UseGuards(JwtAuthGuard,RolesGuard)
only owner can access the protected resource