How to get the authentication header to save
I am trying to set up token based authentication in python. using Django / DRF. but this is more about http in general I think.
When users enter username / password, I return my token to them via JSON.
The client can then post the token in the HTTP header for verification.
My problem is that I want the token to be stored in the header automatically, just like cookies.
When the server says "set-cookie" to the browser (Chrome / FF), the browser will automatically send the cookie without me, without actually doing anything. Is there something I can do with this token?
I tried to store it in the title: "Authorization", but the browser didn't return it. Is there something like "Set-Authorization"?
thank
+3
source to share