Add middleware and logic for bootstrapping the session auth
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2021-06-05 13:24:12 -05:00
parent 91abcdf8ef
commit f00233d49a
14 changed files with 201 additions and 9 deletions

View File

@@ -1,12 +1,12 @@
import {Authenticatable, AuthenticatableIdentifier, AuthenticatableRepository} from '../types'
import {Awaitable, Maybe} from '../../util'
import {ORMUser} from './ORMUser'
import {Singleton} from '../../di'
import {Injectable} from '../../di'
/**
* A user repository implementation that looks up users stored in the database.
*/
@Singleton()
@Injectable()
export class ORMUserRepository extends AuthenticatableRepository {
/** Look up the user by their username. */
getByIdentifier(id: AuthenticatableIdentifier): Awaitable<Maybe<Authenticatable>> {