From 496292f83c9d0957b7e4536f9fb56de7cb301327 Mon Sep 17 00:00:00 2001 From: Paul Date: Wed, 21 Jul 2021 18:25:10 +0100 Subject: [PATCH] Add bot token authentication. --- src/index.ts | 6 ++++++ src/openapi/paths.ts | 3 +++ 2 files changed, 9 insertions(+) diff --git a/src/index.ts b/src/index.ts index 87384c7..be03cfa 100644 --- a/src/index.ts +++ b/src/index.ts @@ -39,6 +39,12 @@ async function generate(): Promise { in: "header", name: "x-session-token", description: "Session is created by calling `/auth/login`.\n" + }, + 'Bot Token': { + type: "apiKey", + in: "header", + name: "x-bot-token", + description: "Bot tokens can be found by fetching `/bots/:id`.\n" } } } diff --git a/src/openapi/paths.ts b/src/openapi/paths.ts index c32c1aa..f439b39 100644 --- a/src/openapi/paths.ts +++ b/src/openapi/paths.ts @@ -57,6 +57,9 @@ export function routeAuthenticated(summary: string, description: string, obj: Om { 'User ID': [], 'Session Token': [] + }, + { + 'Bot Token': [] } ] }