You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lib/src/http/session/SessionFactory.ts

24 lines
793 B

import {Instantiable} from '../../di'
import {Maybe} from '../../util'
import {MemorySession} from './MemorySession'
import {Session} from './Session'
import {ConfiguredSingletonFactory} from '../../di/factory/ConfiguredSingletonFactory'
export class SessionFactory extends ConfiguredSingletonFactory<Session> {
protected getConfigKey(): string {
return 'server.session.driver'
}
protected getDefaultImplementation(): Instantiable<Session> {
return MemorySession
}
protected getAbstractImplementation(): any {
return Session
}
protected getDefaultImplementationWarning(): Maybe<string> {
return 'You are using the default memory-based session driver. It is recommended you configure a persistent session driver instead.'
}
}