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

(12-09-2017, 08:09 AM)daveĀ friend Wrote: You are asking about Authentication which is a separate concern from REST API.

There are many third-party authentication libraries build for CodeIgniter. Community Auth and Ion_Auth are but two that are in wide use. There are others and also lots of examples on how to do-it-yourself. Any of these could be integrated using a RESTful API.

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.
Reply


Messages In This Thread
RE: Is REST API Possible with Codeigniter? - by skunkbad - 12-09-2017, 11:01 AM



Theme © iAndrew 2016 - Forum software by © MyBB