In a thousand-foot view, you need to authenticate the user with:
A) HTTP-Auth ( basic or digest ) for each request.
B) Server-side sessions. (The user authenticates and receives the session key - their user information is stored in the session backend on the server attached to this key. After they have a session, they can make requests that transmit their session key to you (in the URL or in the cookie), and the information they have access to is returned to them.)
There are a couple of useful extensions in the bulb that relate to most of this kind of thing - check Flask-Login and Flask-Principal to see examples of how authorization can be added to a jar application.
Sean vieira
source share