Login in from Phone App
You would need to either expose the django token in the settings file so that it can be accessed via jquery, or that decorator wont be accessible via mobile. Alternatively, you can start using something like oauth
I have developed a Python/Django application for a company. In this app all the employees of the company have a username and a password to login in. Now there is a need for a phone application that can do some functionality.
In some functions I have the decorator @login_required
For security reasons I would like to work with this decorator than against it, so how do I?
I'm using PhoneGap (JavaScript/JQuery) to make the phone app if that helps. I can do my own research but I just need a starting point. Do I get some sort of token and keep it in all my HTTP request headers?
First Attempt:
I was thinking that maybe I POST to the server and get some kind of Authentication Token or something. Maybe there is some Javascript code that hashes my password using the same algorithm so that I can compare it to the database.
Thanks