45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
openapi: 3.0.0
|
|
info:
|
|
title: Simple HTTP Auth API
|
|
version: 1.0.0
|
|
paths:
|
|
/api/auth/passphrase:
|
|
post:
|
|
summary: Authenticate with a passphrase
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
passphrase:
|
|
type: string
|
|
description: The passphrase to authenticate with.
|
|
required:
|
|
- passphrase
|
|
responses:
|
|
'200':
|
|
description: Authentication successful
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
message:
|
|
type: string
|
|
example: "Authentication successful"
|
|
sessionToken:
|
|
type: string
|
|
description: A token to maintain the session.
|
|
'401':
|
|
description: Invalid passphrase
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
properties:
|
|
message:
|
|
type: string
|
|
example: "Invalid passphrase"
|