Welcome Guest, Not a member yet? Register   Sign In
Is REST API Possible with Codeigniter?
#7

(12-09-2017, 11:01 AM)skunkbad Wrote: The problem with using a standard authentication library with an API is that most APIs don't work that way. I've used a lot of APIs over the years, and never used one ever that utilized cookies/sessions, which is how Community Auth works, and I'm assuming how Ion Auth works.

You'd normally have API users sign up and assign them a username and password for their API access. So you develop that, and when API requests come in they must include the username and password. With the exception of Amazon, every API I've used works this way, unless authentication is not required. It's not rocket science.

The term "API" covers a lot of territory. I believe there is a difference between what "API" means to you and what the OP is thinking. It seems to me that you are talking about APIs that allow a developer to access services (Amazon, Twitter, etc) so the service can be integrated into a website or application. As such, it makes perfect sense that the developer has the proper credentials to access the API. I took the OP's remark to be about the site's end-user authentication - not permission to access a development library.

My understanding might be faulty, but if not then integrating a package like Community Auth into his site (via a REST architecture) does not seem out of line to me and deserves consideration. It would be a lot less work than DIY from scratch.
Reply


Messages In This Thread
RE: Is REST API Possible with Codeigniter? - by dave friend - 12-09-2017, 12:24 PM



Theme © iAndrew 2016 - Forum software by © MyBB