I'm using PHP-CRUD-API and everything works perfectly. I'm thinking about simple in use authentication, what are your refering? I'm front-end dev, so I'm looking very easy to implementation script.
-
1Judging by this article (leaseweb.com/labs/2015/11/…) PHP-CRUD-API now supports authorization and validation– PeonMay 23, 2016 at 9:06
-
ye, but is about authorization. Im looking for solution, where other people cant access api.– user3782638May 23, 2016 at 9:09
-
2I might be wrong, but it does not seem to be designed as a cms or other type of open access website. But you can add .htaccess authentication to your project: google.com/search?q=.htaccess+authentication– PeonMay 23, 2016 at 9:12
-
thanks, i will read about htaccess, maybe someone else will answer with other solution– user3782638May 23, 2016 at 10:24
-
1An ajax request is a form-like request from a browser submitted by javascript. To limit requests for API you probably want to assign an API key/sha/salt and check for json/xml-type requests only. That can be validated by reading ie the request headers.– PeonMay 24, 2016 at 10:33
|
Show 1 more comment
1 Answer
Take a look at PHP-API-AUTH, it is a "Single file PHP script that adds authentication to a PHP-CRUD-API project". It does exactly what you ask for.
Disclaimer: I'm the author of PHP-CRUD-API.
-
1
-
1@MaartenHeideman In PHP-CRUD-API v2 the authorization and authentication system has been redone and now you can easily add users using a text file. Oct 1, 2018 at 16:05
-
1
-
1Hey Mev, Please guide how can i authenticate api so only people with my secret key can access it only... Jun 12, 2021 at 12:57