-1

I'm fairly new to Swift and also very new to JSON and REST. I'm trying to make an app where a User can login and it will show their query center and files on their accounts. This app is heavily dependent APIs. I'm not sure how I would validated the username and password. All of the usernames and Passwords are saved on a company server and they are also using AWS for their web service.

If someone could show me an example in swift of how to get data with authentication or point me in the right direction that would be great. Thanks!

  • If the user data is stored on the company server then the login needs to be validated there. On the client, you can check what the HTTP response is to your login request to the server. – William Anderson Jun 29 '16 at 13:43

1 Answers1

0

I needed to do a similar thing and this worked for me: https://gist.github.com/n8armstrong/5c5c828f1b82b0315e24

Jacolack
  • 1,365
  • 2
  • 11
  • 25
  • Wow thank you! Would you be able to explain this to me? So I just need to change the URL right? – George Wisten Jul 01 '16 at 13:03
  • That sometimes works but sometimes it's not that simple. My question [here](http://stackoverflow.com/q/38116022/6481734) has an answer that explains it all perfectly. – Jacolack Jul 02 '16 at 21:53