I have a django app that I made and have implemented a plist into it so that xcode can get the latest info from the database. I used a line of code like this:
items = [NSArray arrayWithContentsOfURL:[NSURL URLWithString:@"http://192.168.1.186:8000/organizer/1.plist"]];
I know I will have to edit this a little bit once I deploy it. How would I make xcode login with a user’s credentials so I know that the user is authenticated? Would I have to include the user’s credentials in the url or is there some special post thing that i can do to send the credentials securely?
Restufl API’s are supposed to be stateless, so you wouldn’t want use a cookie to authenticate a user. http://en.wikipedia.org/wiki/Representational_state_transfer
There are many ways to authenticate users for apis. You can roll your own or use popular django apps like
pistonortastypiethese support a number of authentication schemes. Including a basic username and password.You would probably want to make sure you use ssl if a users login and password are being passed in each request.