n8n
Version:
n8n Workflow Automation Tool
12 lines (11 loc) • 623 B
TypeScript
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;
constructor(apiKeyRepository: ApiKeyRepository, jwtService: JwtService);
buildTokenGrant(token: string, options?: AuthStrategyOptions): Promise<TokenGrant | false | null>;
authenticate(req: AuthenticatedRequest): Promise<boolean | null>;
}