From a8ede765718fb2252442386c16036a73ccd1a286ad8a6553d1cda6125ea819f6 Mon Sep 17 00:00:00 2001 From: aslan Date: Thu, 1 Jan 2026 17:07:12 +0100 Subject: [PATCH] Rework authentication --- VERSION | 2 +- docs/api/auth.md | 21 ++++++++++++++++----- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/VERSION b/VERSION index 67f8d58..960be68 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.3.4 +0.3.5 diff --git a/docs/api/auth.md b/docs/api/auth.md index d582559..d5235e6 100644 --- a/docs/api/auth.md +++ b/docs/api/auth.md @@ -30,8 +30,6 @@ Registers a new user } ``` ---- - ## POST /api/v1/auth/login ### Request: @@ -43,15 +41,14 @@ Registers a new user } ``` -Logs in a user and returns a new session +Logs in a user and returns a new session cookie ### Response (success): ```json { "id": "string", - "ownerId": "string", - "token": "string" + "ownerId": "string" } ``` @@ -63,3 +60,17 @@ Logs in a user and returns a new session "error": "incorrect credentials" } ``` + +## GET /api/v1/auth/refresh + +Creates and returns an authorization token for the current session using session cookie + +### Response (success): + +```json +{ + "id": "string", + "ownerId": "string", + "token": "string" +} +```