We have to create a custom API written in PHP that will expose data to various stakeholders. These stakeholders will get access to functions like:
- getUserDetails($uid)
- getUserProducts($uid)
- getUserDevices($uid)
(and possibly more later on...)
My problem is that I am trying to decide on the best way to authenticate users of the API. I thought OAuth would be the way to go, but after reading this, I got the impression OAuth is only really used for things like logging in via Facebook or Gmail etc.
So my question is really this: What is the best type of authentication to use when creating a PHP API that external stakeholders can use? And is OAuth relevant in such a case?