Note that there are some explanatory texts on larger screens.

plurals
  1. POCreating an Api-Centric Application, my own doubts
    primarykey
    data
    text
    <p>I am trying to wrap my head around all this "api-centric" concept and somehow, for various reasons(after turning SO upside down) i am not able to find answers by my own, so i hope you can help me :) </p> <p>Here it is, as part of a personal project i need to create something like a social application website, i say "like" because it's just a small project, nothing too fancy. </p> <p>The idea i have in mind is that i create a rest service, say something like <a href="http://api.domain.com/v1/" rel="nofollow">http://api.domain.com/v1/</a> with all the needed methods for resources (create/delete/update/read). </p> <p>Now, after this service will be created, i need to create my website, say <a href="http://www.domain.com/" rel="nofollow">http://www.domain.com/</a> and this website will communicate with my api.domain.com for each action it does. If a new user registers, send the data to the api server, process it, return an answer and so on. </p> <p>Then, after the website is created, i am planning to use phonegap to create a native application for iphone and android. These mobile applications, will basically act just like my website does, connect to the api server and do various actions.</p> <p>This is pretty simple if no authorization is involved, so anyone who knows the api endpoints would be able to manage all the resources, thing that as you would guess, i don't want, so i have to implement some kind of authorization mechanism and i am not really sure what to use. I am thinking to implement OAuth2 so that my api act as a oauth provider, then my website/mobile apps will connect to the api, get authorized and then do their job. Is this a good approach, any thoughts? </p> <p>Next, let's say i stick with oauth and everything works okay, what if i want to give my users the opportunity to create their own apps to access info about the other users/or their own data(basically i have a public api, why not taking advantage of that), then the user that will install the app will need to approve it in order to get access to his info. I know this is possible with oauth(since facebook/twitter/others does it), the question is, how do i differentiate between simple user created apps and my own ones(like the website and mobile apps)? Is this separation doable by providing various "scopes" when requesting permssions? If not, what other approach should i use?</p> <p>I'm not too experienced with oauth, so maybe some of the questions are a bit wrong, hopefully you get the point of my problem.</p> <p>If it helps, i'll use PHP 5.4 with Yii framework, Apache 2(mod ssl available), MySQL. </p> <p>Thanks :)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload