Files
lib/src/auth/config.ts
garrettmills f00233d49a
All checks were successful
continuous-integration/drone/push Build is passing
Add middleware and logic for bootstrapping the session auth
2021-06-05 13:24:12 -05:00

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,
}
}