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