elewis-nestjs-security
TypeScript icon, indicating that this package has built-in type declarations

0.1.88 • Public • Published

Common security modules

Overview

!!! This is an experimental module !!!

Provides an authorziation guard and role guard for use in nestjs based APIs.

Install

npm install elewis-nestjs-security

Types

  • AuthGuard
  • RolesGuard

Usage

To Use the Authorisation guard:

import { AuthGuard, RolesGuard } from 'elewis-nestjs-security';
  @Get()
  @UseGuards(AuthGuard)
  async findAll(
    @Headers('Authorization') authorzation: string,
  ): Promise<Agreement[]> {
    return this.agreementsService.findAll();
  }

Readme

Keywords

none

Package Sidebar

Install

npm i elewis-nestjs-security

Weekly Downloads

3

Version

0.1.88

License

MIT

Unpacked Size

81.7 kB

Total Files

107

Last publish

Collaborators

  • eldon.lewis1