fix api: token is only included when logging in.

This commit is contained in:
Miroslav Šedivý 2025-02-20 19:07:00 +01:00
parent 33580fe440
commit 8f693fc379
6 changed files with 27 additions and 15 deletions

View file

@ -5,7 +5,7 @@ description: "Retrieve information about the current user session."
sidebar_label: "Get Current User"
hide_title: true
hide_table_of_contents: true
api: eJzVWE1z4zYS/StdmKrULouilJk96ebVKIlrPjJlOZuDx+WCyBaJEQhw0KA8Wpf++1YDJEXLno0ryiUnywTwXvdDf5EPwsuSxPxG5K1zaPyEkEhZI25TUSDlTjWe/52LK/RO4Q5BmY11teTHINe29eArhO48tIQOOpBMpMI26MLey0LMxX1lZa1EKhxSYw0hifmDeD2b8Z/HfIsx4JjTdYYUQG2eI9Gm1XrPXLk1Ho1nLNk0WuXhwPQLMeCDoLzCWvIvv29QzIVdf8Hci1Q0js30KpqjitEe8k6ZUpyqcV0htEZ9bRFUgcarjUIHdhO0GNw/pMLbLZqX4XXHIBxJwRq9B7WB3NqtQpCtr5goOgWKoFAk1xqLwNM4u1Ean+rIyN3iIxk7W1le1u7bpI+EGus1OuII+P86GVnjyzzjnT1hhA82K7qTRa3G8qyt1SjNE5RLU7DnSKzIEYZlkAYCSoDMpbnTtjwLM5cGtC1hBJlbY1iC80A7lAH1Xvq8OhMzYAyIlaVzjWSIAY8q6fCuxkLJM2EDEgSkAV2G9L3LtWrWVrriTIoIF6tRDxm4CE1Bd8rI3Ksd3uWtI+vOIAt40ONBxDtqhnjKReeKh3hKRzHrdVsqQ8/VNFkUiqGl/jTKWu9aPGW+GHZCxANC75UpmYNLmPJcWMSHYNCnrtCwrl7671Scvh2ELU/q4h9VFkV9xuGfCorYMwgGkL7chGzhKnUGaI/xWJxV9G0VJHlm4a30UhwOvPKv2Y/Pi+bwa4vkw1/lkCLl48L/F/a5Golk+YIS/ha9VBoLQOesg+7cY/+XvPShQ+z9fPO8n4Ruhw5aU6Ajb20R9O28T2HdsgSblpDA2+C/deq/CMr/bbw/pKJGX1keekoM7NJXYi6mslHTYQyK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gnIHRr1fZKP6SpK9/XFY2yuCkdFIZHC45SWIMj+65q3ocOo8uLkT3v3kc4FpXhBGBUh5bQo8JRYP/LwiBX9i85UjrT4pUaJWjITy+RouLRuYVwstQ6R+1+/v7+0yG1cy6ctodpen7y8Xy42o5eZnNssrXOjSUxpKvpRkBv0EP/Z8cHPqnjeThOFH93T9fuu7p8ZufNloqw/01+PDQzT033FpF2v8xc5uK+Kp6Ix4e1pLwN6cPB34ce+785jYVO+mUXHNb5JFFVCgLdGHA2eKeFctzbHi02kndxu59Mg7yXDOMYW+W1+Jw+BPHSniv
sidebar_class_name: "get api-method"
info_path: docs/api/neko-api
custom_edit_url: null
@ -54,7 +54,7 @@ Retrieve information about the current user session.
<StatusCodes
id={undefined}
label={undefined}
responses={{"200":{"description":"Current user information retrieved successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the session."},"token":{"type":"string","description":"The session token, only if cookie authentication is disabled."},"profile":{"description":"The profile information of the user.","x-tags":["members"],"type":"object","properties":{"name":{"type":"string","description":"The name of the member."},"is_admin":{"type":"boolean","description":"Indicates if the member is an admin."},"can_login":{"type":"boolean","description":"Indicates if the member can log in."},"can_connect":{"type":"boolean","description":"Indicates if the member can connect."},"can_watch":{"type":"boolean","description":"Indicates if the member can watch."},"can_host":{"type":"boolean","description":"Indicates if the member can host."},"can_share_media":{"type":"boolean","description":"Indicates if the member can share media."},"can_access_clipboard":{"type":"boolean","description":"Indicates if the member can access the clipboard."},"sends_inactive_cursor":{"type":"boolean","description":"Indicates if the member sends inactive cursor."},"can_see_inactive_cursors":{"type":"boolean","description":"Indicates if the member can see inactive cursors."},"plugins":{"type":"object","additionalProperties":true,"description":"Additional plugin settings."}},"title":"MemberProfile"},"state":{"description":"The current state of the session.","type":"object","properties":{"is_connected":{"type":"boolean","description":"Indicates if the user is connected."},"is_watching":{"type":"boolean","description":"Indicates if the user is watching."}},"title":"SessionState"}},"title":"SessionData"}}}},"401":{"description":"The request requires user authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Detailed error message."}},"title":"ErrorMessage"}}}},"403":{"description":"The server understood the request, but refuses to authorize it.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Detailed error message."}},"title":"ErrorMessage"}}}}}}
responses={{"200":{"description":"Current user information retrieved successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the session."},"profile":{"description":"The profile information of the user.","x-tags":["members"],"type":"object","properties":{"name":{"type":"string","description":"The name of the member."},"is_admin":{"type":"boolean","description":"Indicates if the member is an admin."},"can_login":{"type":"boolean","description":"Indicates if the member can log in."},"can_connect":{"type":"boolean","description":"Indicates if the member can connect."},"can_watch":{"type":"boolean","description":"Indicates if the member can watch."},"can_host":{"type":"boolean","description":"Indicates if the member can host."},"can_share_media":{"type":"boolean","description":"Indicates if the member can share media."},"can_access_clipboard":{"type":"boolean","description":"Indicates if the member can access the clipboard."},"sends_inactive_cursor":{"type":"boolean","description":"Indicates if the member sends inactive cursor."},"can_see_inactive_cursors":{"type":"boolean","description":"Indicates if the member can see inactive cursors."},"plugins":{"type":"object","additionalProperties":true,"description":"Additional plugin settings."}},"title":"MemberProfile"},"state":{"description":"The current state of the session.","type":"object","properties":{"is_connected":{"type":"boolean","description":"Indicates if the user is connected."},"is_watching":{"type":"boolean","description":"Indicates if the user is watching."}},"title":"SessionState"}},"title":"SessionData"}}}},"401":{"description":"The request requires user authentication.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Detailed error message."}},"title":"ErrorMessage"}}}},"403":{"description":"The server understood the request, but refuses to authorize it.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Detailed error message."}},"title":"ErrorMessage"}}}}}}
>
</StatusCodes>