@irfanakbari/nova-auth
Version:
Authentication and authorization module for NestJS
15 lines (14 loc) • 486 B
TypeScript
import { AuthUser } from '../interfaces/auth.interface';
export interface ExcludeRule {
path?: string | RegExp;
method?: string;
}
export interface AuthModuleOptions {
jwtSecret: string;
bypassRoles?: string[];
roleAggregator?: (roles: string[] | string) => string[];
sessionValidator?: (payload: AuthUser) => Promise<boolean> | boolean;
exclude?: (string | RegExp | ExcludeRule)[];
excludeControllers?: Function[];
excludeModulePrefix?: string[];
}