UNPKG

n8n

Version:

n8n Workflow Automation Tool

15 lines (14 loc) 743 B
import { Logger } from '@n8n/backend-common'; import type { AuthenticatedRequest, TokenGrant } from '@n8n/db'; import { ApiKeyRepository } from '@n8n/db'; import type { AuthStrategy, AuthStrategyOptions } from './auth-strategy.types'; import { JwtService } from './jwt.service'; export declare class ApiKeyAuthStrategy implements AuthStrategy { private readonly apiKeyRepository; private readonly jwtService; private readonly logger; constructor(apiKeyRepository: ApiKeyRepository, jwtService: JwtService, logger: Logger); buildTokenGrant(token: string, options?: AuthStrategyOptions): Promise<TokenGrant | false | null>; private touchLastUsedAt; authenticate(req: AuthenticatedRequest): Promise<boolean | null>; }