2025-06-10 12:50:45 +02:00

66 lines
2.6 KiB
YAML

/auth/login:
post:
operationId: loginUser
summary: Login to OpenVidu Meet
description: >
Authenticates a user and returns an access and refresh token in cookies.
tags:
- Internal API - Authentication
requestBody:
$ref: '../../components/requestBodies/internal/login-user.yaml'
responses:
'200':
$ref: '../../components/responses/internal/success-user-login.yaml'
'404':
$ref: '../../components/responses/internal/error-invalid-credentials.yaml'
'422':
$ref: '../../components/responses/validation-error.yaml'
'500':
$ref: '../../components/responses/internal-server-error.yaml'
/auth/logout:
post:
operationId: logoutUser
summary: Logout from OpenVidu Meet
description: >
Logs out the user and clears the access and refresh tokens from cookies.
tags:
- Internal API - Authentication
responses:
'200':
description: Successfully logged out
headers:
Set-Cookie:
schema:
type: string
example: 'OvMeetAccessToken=; Path=/; HttpOnly; SameSite=Strict'
Set-Cookie-Refresh:
schema:
type: string
example: 'OvMeetRefreshToken=; Path=/meet/internal-api/v1/auth; HttpOnly; SameSite=Strict'
content:
application/json:
schema:
type: object
properties:
message:
type: string
example: 'Logout successful'
/auth/refresh:
post:
operationId: refreshAccessToken
summary: Refresh the access token
description: >
Refreshes the access token using the refresh token.
The new access token is returned in a cookie.
tags:
- Internal API - Authentication
security:
- refreshTokenCookie: []
responses:
'200':
$ref: '../../components/responses/internal/success-refresh-token.yaml'
'400':
$ref: '../../components/responses/internal/error-invalid-refresh-token.yaml'
'500':
$ref: '../../components/responses/internal-server-error.yaml'