UNPKG

n8n

Version:

n8n Workflow Automation Tool

19 lines (18 loc) 731 B
import { TaskRunnersConfig } from '@n8n/config'; import { CacheService } from '../../../services/cache/cache.service'; export type GrantTokenConsumption = { isValid: boolean; boundRunnerId: string | null; }; export declare class TaskBrokerAuthService { private readonly runnersConfig; private readonly cacheService; private readonly authToken; private get grantTokenTtlInMs(); constructor(runnersConfig: TaskRunnersConfig, cacheService: CacheService); isValidAuthToken(token: string): boolean; createGrantToken(runnerId?: string): Promise<string>; tryConsumeGrantToken(grantToken: string): Promise<GrantTokenConsumption>; private generateGrantToken; private cacheKeyForGrantToken; }