How to use sessions with django piston auth?

The problem is that I want to store authentication in a cookie, which I can present to the django piston, and not require a password to be entered / entered each time (without hard-coding or storing the user / pass command somewhere on disk). I was hoping to do this with cookies, like someone, without a piston API. Did I miss something?

Django Piston doesn't care about session cookies at all?

Or can someone suggest a good alternative? Maybe I shouldn't use Piston?

+4
source share
2 answers

If you try to keep the user registration after authentication, the Django created in the sessions will do it for you. You can change the duration of a session by changing the SESSION_COOKIE_AGE parameter. It will also change how long sessions are stored in your database (if you use a database backend).

0
source

Source: https://habr.com/ru/post/1307381/


All Articles