The writeJwt function is responsible for generating and writing a JWT (JSON Web Token) secure cookie to the user's browser.
denyAccess
This function exits and returns a login required error.
flagActivity
FlagActivity" flags suspicious request patterns to deter potential brute force attacks. After a set number of flagged requests from a single IP, it blocks that IP to protect the platform.
deleteJwt
The deleteJwt function is responsible for remove the current (if any) JWT (JSON Web Token) secure cookie from the user's browser.
getProfilePictureUrl(user)
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, which can be used to display the user's profile picture in applications or web interfaces.