UNPKG

@webundsoehne/nestjs-auth0-guard

Version:

NestJS Auth0 Guard

39 lines (38 loc) 868 B
export interface Auth0Options { domain: string; clientId: string; clientSecret: string; audience?: string; namespace?: string; passportOptions?: Record<string, any>; } export interface Auth0TokenPayload { iss: string; sub: string; aud: [string]; iat: number; exp: number; azp?: string; scope?: string; permissions?: [string]; [name: string]: any; } export interface Auth0TokenUser { userId: string; expiresAt: Date; permissions?: [string]; [name: string]: any; } export interface Auth0Permissions extends Array<string> { } export interface Auth0RequestProperty { permissions: Auth0Permissions[]; } export interface RequestParam { [name: string]: string; } export interface VerifyPermissionsOptions { payload: Auth0TokenPayload; auth0: Auth0RequestProperty; id?: string; }