Functions for authenticating users with JWT cookies, controlling access to API endpoints, and managing sessions.
The writeJwt function generates a signed JWT (JSON Web Token) and writes it as a secure session cookie (access_token) to the user's…
access_token
The deleteJwt function is responsible for removing the current (if any) JWT (JSON Web Token) secure cookie from the user's browser.
Stops execution of the current API request and returns an HTTP 401 Login Required response to the caller. Use it in #/API/ endpoints to…
Ends the built-in Docly session for the calling user and clears the session cookie. Typically invoked from an API endpoint (e.g.…
flagActivity flags suspicious request patterns to deter potential brute force attacks. After a set number of flagged requests from a single…
This function retrieves the URL of a user's profile picture from the system. It returns a string containing the direct link to the image,…