Add rate-limiting on password login attempts

Signed-off-by: DL6ER <dl6er@dl6er.de>
This commit is contained in:
DL6ER
2023-09-23 12:25:12 +02:00
parent de7227347b
commit 2141db3d64
9 changed files with 113 additions and 14 deletions
+8
View File
@@ -79,6 +79,14 @@ components:
allOf:
- $ref: 'common.yaml#/components/errors/unauthorized'
- $ref: 'common.yaml#/components/schemas/took'
'429':
description: Too Many Requests
content:
application/json:
schema:
allOf:
- $ref: 'common.yaml#/components/errors/too_many_requests'
- $ref: 'common.yaml#/components/schemas/took'
delete:
summary: Delete session
tags:
+20
View File
@@ -53,6 +53,26 @@ components:
nullable: true
description: "No additional data available"
example: null
too_many_requests:
type: object
description: "Too many requests (rate limiting)"
properties:
error:
type: object
properties:
key:
type: string
description: "Machine-readable error type"
example: "too_many_requests"
message:
type: string
description: "Human-readable error message"
example: "Too many requests"
hint:
type: string
nullable: true
description: "No additional data available"
example: null
headers:
Location:
description: Location of created resource