nralcm
Version:
This is a framework based on NodeJs to manage rest api request lifecycle
13 lines (12 loc) • 335 B
TypeScript
import { HttpContext } from "..";
/**
* Interface for implementation of Authorization
*/
export interface IAuthorize {
/**
* Method to check authorization of request
* @param context HttpContext Object
* @param roles Roles for access of api
*/
authorize(context: HttpContext, roles: string[]): boolean;
}