UNPKG

n8n

Version:

n8n Workflow Automation Tool

11 lines (10 loc) 417 B
import type { ApiKeyAudience } from '@n8n/api-types'; import type { AuthenticatedRequest, TokenGrant } from '@n8n/db'; export type AuthStrategyOptions = { audience?: ApiKeyAudience; issuer?: string; }; export interface AuthStrategy { authenticate(req: AuthenticatedRequest): Promise<boolean | null>; buildTokenGrant(token: string, options?: AuthStrategyOptions): Promise<TokenGrant | false | null>; }