n8n
Version:
n8n Workflow Automation Tool
14 lines (13 loc) • 694 B
TypeScript
import type { AuthenticatedRequest, TokenGrant } from '@n8n/db';
import { UserRepository } from '@n8n/db';
import type { AuthStrategy, AuthStrategyOptions } from '../../../services/auth-strategy.types';
import { JwtService } from '../../../services/jwt.service';
export declare class ScopedJwtStrategy implements AuthStrategy {
private readonly jwtService;
private readonly userRepository;
constructor(jwtService: JwtService, userRepository: UserRepository);
buildTokenGrant(token: string, options?: AuthStrategyOptions): Promise<TokenGrant | false | null>;
authenticate(req: AuthenticatedRequest): Promise<boolean | null>;
private findUser;
private extractToken;
}