UNPKG

767 BPlain TextView Raw
1import { Pool } from "pg";
2import { Authorization } from "./model";
3import { StrategyCollection } from "./StrategyCollection";
4import { Explanation } from "./util/explanations";
5
6export interface Context {
7 readonly realm: string;
8 readonly base: string;
9 readonly privateKey: string;
10 readonly publicKeys: ReadonlyArray<string>;
11 readonly codeValidityDuration: number;
12 readonly jwtValidityDuration: number;
13 readonly sendMail: (options: {
14 readonly to: string;
15 readonly subject: string;
16 readonly text: string;
17 readonly html: string;
18 readonly from?: string;
19 }) => Promise<any>;
20 readonly pool: Pool;
21 readonly strategies: StrategyCollection;
22 readonly explanations: ReadonlyArray<Explanation>;
23 authorization: null | Authorization;
24}