Authentication

Hi all -

Can someone give me a breakdown on the basics of how i could authenticate a user. similar to Facebook, so i can pull back profile data? I searched the forum and didn’t really find anything substantial (or that was lamen enough for me to understand)…

…do you use tokens, a database, etc…

Thanks

Dan

Hi @danimaltex.  You are asking a question that is way too broad in scope.  We know nothing about what service you are trying to connect to and there are way too many different ways to authenticate.  Please tell us more about the service you want to connect to and it would be helpful if you read and understood their authentication methods so we can try and help.

Hi Rob -

Thanks for the quick response. I am basically trying to create an app that stores user profiles of two seperate entities. For example: The first type of profile would be musicians. They could register and create profiles (possibly through a website as well). They would have to log in to view their profiles of course. The second type of profiles are for venues. They would also be able to log in and view their profile. Once logged in i want to be able to match them up to schedule shows.

The way i currently envision it is that I can open the app and either register (create profile) of already have a profile that is private to only me or my band. This would require some sort of authentication. I could use a simple database stored username and password generated upon account creation, but am just not sure how the mobile device “talks” to a hosted database. In addition, im having trouble finding good examples on that type of username/password (profile) examples.

So I may be wrong, i haven’t been developing long, but it sounds like REST is what i need to explore. I have seen several articles (albeit not detailed) that reference REST as opposed to SOAP.

Just looking for a direction to go with this.

Thanks

Danimaltex

In addition to the above, I think storing the profiles on a database would be best, since (as a DBA) im most familiar with that concept. That is the direction im wanting to go to store the profile data.

Thanks,

Danimaltex

Yes, you want to go with REST.  A couple of people have claimed to get SOAP working, but XML isn’t as friendly of a data format for Lua as JSON is.  REST is all HTTP GET/PUT/POST/DELETE actions and can use various basic authentication/session management.  SOAP’s login work is more complex.

But it sounds like you’re building your own system, so you can make whatever authentication you want.  I’d pass a username/password to the server, look them up and send back some random code that they would use in future requests…

Hi @danimaltex.  You are asking a question that is way too broad in scope.  We know nothing about what service you are trying to connect to and there are way too many different ways to authenticate.  Please tell us more about the service you want to connect to and it would be helpful if you read and understood their authentication methods so we can try and help.

Hi Rob -

Thanks for the quick response. I am basically trying to create an app that stores user profiles of two seperate entities. For example: The first type of profile would be musicians. They could register and create profiles (possibly through a website as well). They would have to log in to view their profiles of course. The second type of profiles are for venues. They would also be able to log in and view their profile. Once logged in i want to be able to match them up to schedule shows.

The way i currently envision it is that I can open the app and either register (create profile) of already have a profile that is private to only me or my band. This would require some sort of authentication. I could use a simple database stored username and password generated upon account creation, but am just not sure how the mobile device “talks” to a hosted database. In addition, im having trouble finding good examples on that type of username/password (profile) examples.

So I may be wrong, i haven’t been developing long, but it sounds like REST is what i need to explore. I have seen several articles (albeit not detailed) that reference REST as opposed to SOAP.

Just looking for a direction to go with this.

Thanks

Danimaltex

In addition to the above, I think storing the profiles on a database would be best, since (as a DBA) im most familiar with that concept. That is the direction im wanting to go to store the profile data.

Thanks,

Danimaltex

Yes, you want to go with REST.  A couple of people have claimed to get SOAP working, but XML isn’t as friendly of a data format for Lua as JSON is.  REST is all HTTP GET/PUT/POST/DELETE actions and can use various basic authentication/session management.  SOAP’s login work is more complex.

But it sounds like you’re building your own system, so you can make whatever authentication you want.  I’d pass a username/password to the server, look them up and send back some random code that they would use in future requests…