How to authenticate android user POST request with Django REST API?
You may want to use the Django Sessions middleware, which will set a cookie with a django session_id. On the following requests, the sessions middleware will set an attribute on your request object called user and you can then test if user is authenticated by request.user.is_authenticated()  ( or login_required decorator) . Also, you can set the session timeout to whatever you like in the settings.
This middleware is enabled in default django settings.
As of now, I have a Django REST API and everything is hunky dory for the web app, wherein I have implemented User Auth in the backend. The "login_required" condition serves well for the web app, which is cookie based.
I have an Android app now that needs to access the same API. I am able to sign in the user. What I need to know is how to authenticate every user when they make GET/POST request to my views?
My research shows a couple of solutions:
1) Cookie-backed sessions
2) Send username and password with every GET/POST request(might not be secure)
Any ideas?