user-logout.yaml 744 B

12345678910111213141516171819202122
  1. post:
  2. summary: Log out
  3. operationId: logoutUser
  4. tags:
  5. - Users
  6. description: >
  7. Clears the `token` cookie by overwriting it with an empty value and
  8. `max-age=0`. No authentication is required — the endpoint is always safe
  9. to call even if the cookie is already absent or expired.
  10. responses:
  11. '200':
  12. description: Logged out. The `token` cookie is cleared.
  13. headers:
  14. Set-Cookie:
  15. description: Expired auth cookie that instructs the browser to delete it.
  16. schema:
  17. type: string
  18. example: token=; Path=/; HttpOnly; SameSite=Strict; Max-Age=0
  19. content:
  20. application/json:
  21. schema:
  22. $ref: '../components/schemas/SuccessResponse.yaml'