Files
bifrost/docs/openapi/paths/management/session.yaml
Beyhan Oğur 880f412e2c first commit
2026-04-26 21:52:23 +03:00

106 lines
3.1 KiB
YAML

login:
post:
operationId: login
summary: Login
description: |
Authenticates a user and returns a session token.
Sets a cookie with the session token for subsequent requests.
tags:
- Session
requestBody:
required: true
content:
application/json:
schema:
$ref: '../../schemas/management/session.yaml#/LoginRequest'
responses:
'200':
description: Login successful
content:
application/json:
schema:
$ref: '../../schemas/management/session.yaml#/LoginResponse'
'400':
$ref: '../../openapi.yaml#/components/responses/BadRequest'
'401':
description: Invalid credentials
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
'403':
description: Authentication is not enabled
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
logout:
post:
operationId: logout
summary: Logout
description: Logs out the current user and invalidates the session token.
tags:
- Session
responses:
'200':
description: Logout successful
content:
application/json:
schema:
$ref: '../../schemas/management/session.yaml#/LogoutResponse'
'403':
description: Authentication is not enabled
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
is-auth-enabled:
get:
operationId: isAuthEnabled
summary: Check if authentication is enabled
description: Returns whether authentication is enabled and if the current token is valid.
tags:
- Session
responses:
'200':
description: Successful response
content:
application/json:
schema:
$ref: '../../schemas/management/session.yaml#/IsAuthEnabledResponse'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'
ws-ticket:
post:
operationId: issueWSTicket
summary: Issue WebSocket ticket
description: |
Issues a short-lived ticket for authenticating WebSocket connections.
The ticket can be used as a query parameter when upgrading to WebSocket.
tags:
- Session
responses:
'200':
description: Ticket issued successfully
content:
application/json:
schema:
type: object
properties:
ticket:
type: string
description: Short-lived WebSocket authentication ticket
'403':
description: Authentication is not enabled
content:
application/json:
schema:
$ref: '../../schemas/inference/common.yaml#/BifrostError'
'500':
$ref: '../../openapi.yaml#/components/responses/InternalError'