From fa680b24d1123f9de27fc752943e43c86c692314 Mon Sep 17 00:00:00 2001 From: UMTS at Teleco Date: Sun, 15 Feb 2026 15:53:50 +0100 Subject: JAYSON DERULO --- auth/status.md | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 auth/status.md (limited to 'auth/status.md') diff --git a/auth/status.md b/auth/status.md new file mode 100644 index 0000000..354ea9b --- /dev/null +++ b/auth/status.md @@ -0,0 +1,61 @@ +# GET /auth/status + +[back to auth](README.md) /// [home](../README.md) + +Check if your session is still alive and get details about it. + +## Request + +No body. Token in header: +``` +Authorization: Bearer +``` + +## Valid Session Response (200) + +```json +{ + "success": true, + "valid": true, + "user": { + "id": 1, + "username": "admin", + "name": "Full Name", + "role": "administrators", + "power": 100 + }, + "session": { + "created_at": "2026-02-14T10:30:00Z", + "last_accessed": "2026-02-14T11:45:00Z", + "timeout_minutes": 120, + "remaining_seconds": 5400, + "expires_at": "2026-02-14T13:45:00Z" + } +} +``` + +The `session` object tells you when the session was created, when it was last used, how long the timeout is, how many seconds are left and when itll expire if nothing happens. + +If session refresh on activity is enabled (which it should be by default) then `last_accessed` gets updated on every request so the session keeps extending as long as youre actively bothering jsonderulo. + +## Invalid/Expired Session Response (401) + +```json +{ + "success": true, + "valid": false, + "message": "Session expired or invalid [request_id: 12345678]" +} +``` + +Note that `success` is still true here because the status check itself worked fine, the session is just dead lol. Check the `valid` field to know if the session is actually alive. + +## No Token Response (401) + +```json +{ + "success": false, + "valid": false, + "error": "No authorization token provided [request_id: 12345678]" +} +``` -- cgit v1.2.3-70-g09d2