Adding Auth using login.html issue
I have the api.php (V1) working until I attempt to add authorisation, all I get is the token displayed on the screen but I can't seem to see why?
Just in case there is an easier way to do it all I am trying to do is setup an API which allows me to retrieve data from a mysql database table, but obviously I don't want the public to be able to make changes to the data etc.
Hope someone can help with a working example.
Thanks
This depends on what you want to achieve. If you just want to perform read-only operations, you could simply set the api to read-only so that no changes can be made without direct access to the database. For a simple protection via basic auth you could try the following: https://github.com/mevdschee/php-api-auth/issues/21
Thanks for the suggestion, it worked fine and for my limited needs it'll do the job.
@mevdschee : Looks like a very cool application, which works fine for me without authorization. Once i turn on basic auth it seems to not pick up the htpasswd file. (access is rejected with 401)
I must say i am completly new to API usage and may have some configuration wrong as well. Can you therefore give me some examples how the API.php must look like (incl. paths) for a virtual host setup? (eg. absolute paths?)
Many thanks