1

I want to develop an in house REST API for a web application with the view of opening it up the public in time. Knowing fully well that once the api is accessible in the public space, the need for authentication comes in. This api is to be built on codeigniter using phil sturgeon REST library for codeigniter. So how do i implement an authentication system like Oauth in my api like twitter,facebook, etc do. I would appreciate if you point me to the right resources. Thanks

2
  • Did you implement this? I'm thinking about doing something similar and want to see how you ended up implementing your solution. Commented Mar 23, 2015 at 1:30
  • Check out php league's oAUTH package Commented Mar 23, 2015 at 5:46

1 Answer 1

3

First you need to figure out who you authenticate and what is being authorized. In a typical OAuth case you'll have applications (with credentials: id/secret) being authenticated. Also optionally you will authenticate users (with username/password) and ask them if they authorize the application to perform the action.

Next you need to decide which actions (in case of REST, resources) need to be protected.

And lastly choose between Oauth 1.0 and 2.0, since they are quite different.

Those are most important things that relate to any OAuth project, regardless of implementation.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.