From 23691eb74618b9f4c881ffb4b255c073ca4d5270 Mon Sep 17 00:00:00 2001 From: Andreas Bergmeier Date: Tue, 14 Jan 2025 19:38:29 +0000 Subject: [PATCH] Add initial authentication for OpenAPI Currently only contains basic auth definitions to keep it simple stupid. Mostly just following https://swagger.io/docs/specification/v3_0/authentication/basic-authentication/ --- api/openapi/authentication.yaml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 api/openapi/authentication.yaml diff --git a/api/openapi/authentication.yaml b/api/openapi/authentication.yaml new file mode 100644 index 0000000..a8be35a --- /dev/null +++ b/api/openapi/authentication.yaml @@ -0,0 +1,28 @@ +openapi: 3.0.3 +info: + title: FabAccess Auth API + version: 0.0.1 + +paths: {} + +components: + responses: + Unauthorized: + description: Authentication information is missing or invalid + headers: + WWW_Authenticate: + schema: + $ref: '#/components/schemas/AuthenticationMethod' + + schemas: + AuthenticationMethod: + type: string + description: Mechanism for authentication + + securitySchemes: + basicAuth: + type: http + scheme: basic + +security: +- basicAuth: [] \ No newline at end of file