UNPKG

@dudousxd/nestjs-telescope

Version:

Laravel Telescope-style observability console for NestJS — core: watchers, recorder, correlation, SQLite store, headless API.

21 lines 1.19 kB
import { type CanActivate, type ExecutionContext } from '@nestjs/common'; import type { ResolvedDashboardAuth } from '../auth/dashboard-auth-config.js'; import type { ResolvedCoreConfig } from '../config/options.js'; import { type TelescopeModuleOptions } from './telescope.options.js'; export declare class TelescopeGuard implements CanActivate { private readonly options; private readonly dashboardAuth; private readonly config; constructor(options: TelescopeModuleOptions, dashboardAuth?: ResolvedDashboardAuth | null, config?: ResolvedCoreConfig | null); canActivate(context: ExecutionContext): Promise<boolean>; private verifyRequestSession; /** * Sliding renewal + revalidation: when a valid cookie is past 50% of its TTL, re-issue a fresh one * so active users never get logged out mid-session — but first let the host's `revalidate` hook * re-check the user, so a deactivated or demoted operator loses access instead of riding a * self-renewing cookie. Returns `false` when the session was revoked (cookie already cleared). */ private maybeRenew; private runAuthorizer; } //# sourceMappingURL=telescope.guard.d.ts.map