All checks were successful
continuous-integration/drone/push Build is passing
26 lines
626 B
TypeScript
26 lines
626 B
TypeScript
import {Instantiable} from '../di'
|
|
import {ORMUserRepository} from './orm/ORMUserRepository'
|
|
|
|
/**
|
|
* Inferface for type-checking the AuthenticatableRepositories values.
|
|
*/
|
|
export interface AuthenticatableRepositoryMapping {
|
|
orm: Instantiable<ORMUserRepository>,
|
|
}
|
|
|
|
/**
|
|
* String mapping of AuthenticatableRepository implementations.
|
|
*/
|
|
export const AuthenticatableRepositories: AuthenticatableRepositoryMapping = {
|
|
orm: ORMUserRepository,
|
|
}
|
|
|
|
/**
|
|
* Interface for making the auth config type-safe.
|
|
*/
|
|
export interface AuthConfig {
|
|
repositories: {
|
|
session: keyof AuthenticatableRepositoryMapping,
|
|
}
|
|
}
|