API Key based auth feature/26-api_auth #27

Merged
niggl merged 4 commits from feature/26-api_auth into dev 2021-02-13 20:09:38 +00:00
2 changed files with 9 additions and 0 deletions
Showing only changes of commit 729f2d7240 - Show all commits

View File

@ -14,6 +14,14 @@ export function generateSpec(storage: MetadataArgsStorage, schemas) {
{
components: {
schemas,
"securitySchemes": {
"AuthToken": {
"type": "apiKey",
"in": "query",
"name": "key",
description: "A simple api key. See the README's env section for more details."
}
}
},
info: {
description: "The the API for the LfK! document server.",

View File

@ -11,6 +11,7 @@ import { PdfCreator } from '../PdfCreator';
*/
@JsonController()
@Authorized()
@OpenAPI({ security: [{ "AuthToken": [] }] })
export class PdfController {
private pdf: PdfCreator = new PdfCreator();
private initialized: boolean = false;