UNPKG

1.07 kBTypeScriptView Raw
1import { IModuleConfig } from "@gtm/lib.service";
2export interface IAuthConfig extends IModuleConfig {
3 jwt: IJwtConfig;
4 swagger: ISwaggerConfig;
5}
6export interface ISwaggerConfig {
7 /** baseUrl for Swagger-UI, default to /swagger */
8 baseUrl?: string;
9 /** The system will search the folders for
10 * - *.ts & *.js for routes then register for Swagger API routes
11 * - *.json for config then expose these config for Swagger UI client (the file name will be kept as is)
12 */
13 outputDirs: string[];
14}
15export interface IJwtConfig {
16 headerField: string;
17 bodyField: string;
18 queryField: string;
19 secret: string;
20 paths: string[];
21}
22export declare function normalizeAuth(config: IAuthConfig): IAuthConfig;
23/**
24 "jwt": {
25 "headerField": "x-token",
26 "bodyField": "token",
27 "queryField": "token",
28 "secret": "secret",
29 "paths": ["/web", "/api"]
30 },
31 "swagger": {
32 "baseUrl": "/swagger",
33 "outputDirs": [ "../swagger/output" ]
34 },
35 */