laminas-api-tools / api-tools

Laminas API Tools module for Laminas
https://api-tools.getlaminas.org/documentation
BSD 3-Clause "New" or "Revised" License
37 stars 19 forks source link

Testing Digest auth with curl #66

Open michalbundyra opened 4 years ago

michalbundyra commented 4 years ago

I configured digest auth and now testing endpoints always throws 403-forbidden.

I set absolute path for htdigest file in local.php and I set /my/valid-endpoint as digest_domain in global.php.

This is my curl test (if I disable authentication things run properly):

curl --digest -u "user:pass" -s -H "Accept: application/vnd.myexample.v1+json"     http://localhost:8080/my/valid-endpoint

Originally posted by @richhl at https://github.com/zfcampus/zf-apigility/issues/58

michalbundyra commented 4 years ago

My guess is that the htdigest file is not created properly. Please follow the instructions here:

and let me know if you continue to see the issue.


Originally posted by @weierophinney at https://github.com/zfcampus/zf-apigility/issues/58#issuecomment-49093826

michalbundyra commented 4 years ago

I'm having the same problem. I've set the username and password with the command htdigest I set apigility with http digest and established services that require authentication. But when testing the endpoints with curl always get 403 forbidden Have I missed configuring the settings? Do I have to configure something else in apache?

Thanks


Originally posted by @JaviDTM at https://github.com/zfcampus/zf-apigility/issues/58#issuecomment-74244919