python - Where to store web authentication session in PySide? -


I am creating a small application in Python; I use PySide for GUI and Django to read data from my web application.

Everything works well, but I have login access, like dropbox applications.

I want to store this information on the existing machine (like session, I do not want to login every time I open the application).

Now my question is, what is the safest way to do this? Environment Variables?

Normally when you have an API that you are displaying your app in the outside world ( Even your own desktop / mobile app), as part of the architecture, this API will be designed to be stateless. That's why your app should always include an HTTP header or any other way to keep authentication tokens that will identify the user to your API.

You only log in once, and when the log-in process is successful, you should get an authentication token from your API, and then you will keep this token somewhere safe.

You can also apply for authentication.


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

lua - HowTo create a fuel bar -