import {Instantiable, FactoryProducer} from '../../../di' import {ClientRepository} from '../types' import {ConfigClientRepository} from './ConfigClientRepository' import {ConfiguredSingletonFactory} from '../../../di/factory/ConfiguredSingletonFactory' /** * A dependency injection factory that matches the abstract ClientRepository class * and produces an instance of the configured repository driver implementation. */ @FactoryProducer() export class ClientRepositoryFactory extends ConfiguredSingletonFactory { protected getConfigKey(): string { return 'oauth2.repository.client' } protected getDefaultImplementation(): Instantiable { return ConfigClientRepository } protected getAbstractImplementation(): any { return ClientRepository } }