import {Instantiable, FactoryProducer} from '../../di' import {AuthenticatableRepository} from '../types' import {ORMUserRepository} from './orm/ORMUserRepository' 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 AuthenticatableRepositoryFactory extends ConfiguredSingletonFactory { protected getConfigKey(): string { return 'auth.storage' } protected getDefaultImplementation(): Instantiable { return ORMUserRepository } protected getAbstractImplementation(): any { return AuthenticatableRepository } }