/// import { AuthenticationMetadata, AuthenticationStrategy, TokenService } from '@loopback/authentication'; import { Request } from '@loopback/rest'; import { TwoFactorService } from './two-factor.service'; import { BaseUser, BaseUserProfile } from '../models'; import { BaseUserRepository } from '../repositories'; /** * The jwt authentication strategy. */ export declare class JwtAuthenticationStrategy implements AuthenticationStrategy { private readonly accessTokenService; private readonly metadataArray; private readonly baseUserRepository; private readonly forceTwoFactor; private readonly forceTwoFactorAllowedRoutes; private readonly twoFactorService; readonly name: string; constructor(accessTokenService: TokenService, metadataArray: AuthenticationMetadata[], baseUserRepository: BaseUserRepository, forceTwoFactor: boolean, forceTwoFactorAllowedRoutes: string[], twoFactorService: TwoFactorService); authenticate(request: Request): Promise | undefined>; /** * Checks if the request requires 2fa and validates accordingly. * @param user - The currently logged in user. * @param request - The request, is used to extract the two factor code from the custom header. */ protected validate2FA(user: BaseUser, request: Request): Promise; /** * Extracts the token from the given request. * @param request - The request to get the token from. * @returns The found token. An error otherwise. * @throws An Http-Unauthorized-Error when no token could be found. */ protected extractTokenFromRequest(request: Request): string; }