import { HeadersInit } from 'node-fetch'; import IAuthentication from '../../contracts/IAuthentication'; import ITokenProvider from './ITokenProvider'; import IClientContext from '../../../contracts/IClientContext'; /** * Adapts an ITokenProvider to the IAuthentication interface used by the driver. * This allows token providers to be used with the existing authentication system. */ export default class TokenProviderAuthenticator implements IAuthentication { private readonly tokenProvider; private readonly context; private readonly headers; /** * Creates a new TokenProviderAuthenticator. * @param tokenProvider - The token provider to use for authentication * @param context - The client context for logging * @param headers - Additional headers to include with each request */ constructor(tokenProvider: ITokenProvider, context: IClientContext, headers?: HeadersInit); authenticate(): Promise; }