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();
}