mirror of
https://github.com/0x1d/rcond.git
synced 2025-12-14 18:25:21 +01:00
feat: add API token authentication
This commit is contained in:
@@ -8,6 +8,17 @@ servers:
|
||||
- url: http://localhost:8080
|
||||
description: Local development server
|
||||
|
||||
components:
|
||||
securitySchemes:
|
||||
ApiKeyAuth:
|
||||
type: apiKey
|
||||
in: header
|
||||
name: X-API-Token
|
||||
description: API token for authentication
|
||||
|
||||
security:
|
||||
- ApiKeyAuth: []
|
||||
|
||||
paths:
|
||||
/health:
|
||||
get:
|
||||
@@ -57,6 +68,8 @@ paths:
|
||||
description: Network interface brought up successfully
|
||||
'400':
|
||||
description: Invalid request payload
|
||||
'401':
|
||||
description: Unauthorized - invalid or missing API token
|
||||
'500':
|
||||
description: Internal server error
|
||||
|
||||
@@ -82,6 +95,8 @@ paths:
|
||||
description: Network interface brought down successfully
|
||||
'400':
|
||||
description: Invalid request payload
|
||||
'401':
|
||||
description: Unauthorized - invalid or missing API token
|
||||
'500':
|
||||
description: Internal server error
|
||||
|
||||
@@ -92,6 +107,8 @@ paths:
|
||||
responses:
|
||||
'200':
|
||||
description: Connection profile removed successfully
|
||||
'401':
|
||||
description: Unauthorized - invalid or missing API token
|
||||
'500':
|
||||
description: Internal server error
|
||||
|
||||
@@ -108,6 +125,8 @@ paths:
|
||||
type: string
|
||||
description: Current hostname
|
||||
example: "MyHostname"
|
||||
'401':
|
||||
description: Unauthorized - invalid or missing API token
|
||||
'500':
|
||||
description: Internal server error
|
||||
post:
|
||||
@@ -131,6 +150,7 @@ paths:
|
||||
description: Hostname set successfully
|
||||
'400':
|
||||
description: Invalid request payload
|
||||
'401':
|
||||
description: Unauthorized - invalid or missing API token
|
||||
'500':
|
||||
description: Internal server error
|
||||
|
||||
|
||||
Reference in New Issue
Block a user