audiobookshelf/docs/controllers/AuthController.yaml
Nicholas W 3a91092fbf
Schema updates from August 3 (#1)
* Update: formatting

* Fix: libraryItemController `play` endpoint
+ Endpoints cannot have optional path parameters
+ Moved schemas to `components` section

* Fix: MeController optional path parameters

* Fix: Books do not have `episodeId` in `mediaProgress`

* Fix: `PlaybackSession` oneOf between book and podcast

* Update: bundled spec

* Fix: `allowReserved` in LibraryItem include query

* Add: tags to AuthController endpoints

* Fix: summary of play endpoints

* Update: bundled spec
2024-08-04 09:00:32 +02:00

70 lines
2.1 KiB
YAML

paths:
/login:
post:
summary: Login to the server
description: Logs in a client to the server, returning information about the user and server.
operationId: login
tags:
- Auth
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
username:
$ref: '../objects/entities/User.yaml#/components/schemas/username'
password:
$ref: '../objects/entities/User.yaml#/components/schemas/password'
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
properties:
user:
$ref: '../objects/entities/User.yaml#/components/schemas/user'
'401':
description: Unauthorized - Invalid username or password.
content:
text/html:
schema:
type: string
example: Unauthorized
/logout:
post:
summary: Logout from the server
description: Logs out a client from the server. If the socketId parameter is provided, the server removes the socket from the client list.
operationId: logout
tags:
- Auth
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
socketId:
$ref: '../objects/entities/User.yaml#/components/schemas/socketId'
responses:
'200':
description: Success
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: Success
'401':
description: Unauthorized
content:
text/html:
schema:
type: string
example: Unauthorized