Closed Elithrin closed 8 years ago
Here the detail
GET /servers/ HTTP/1.1 Authorization: Basic YWRtaW46cGFzc3dvcmQ= User-Agent: curl/7.35.0 Host: 127.0.0.1:5000 Accept: /
The same with --digest
curl -u admin:password http://127.0.0.1:5000/servers/ -v --digest
GET /servers/ HTTP/1.1 User-Agent: curl/7.35.0 Host: 127.0.0.1:5000 Accept: /
GET /servers/ HTTP/1.0 Authorization: Digest username="admin", realm="Authentication Required", nonce="505dc8a3e7cab821fcaffd9f98aee3d9", uri="/servers/", response="bbfa97118ae998aff8a4b85229fcdcc1", opaque="0022896c76e2ad847db1901883242c84" User-Agent: curl/7.35.0 Host: 127.0.0.1:5000 Accept: /
Hi @Elithrin,
The murmur-rest project uses the Flask-HTTPAuth library, and the digest implementation uses Flask's sessions by default for the auth challenge data, so you need cookies.
Try:
curl -u "user:pass" http://127.0.0.1:5000/servers/ -v --digest -c ./cookie
and it should work.
Hope that helps! Feel free to re-open if doesn't work for you.
Thanks ! All is good !
Hello,
Sorry for my english. I have activate digest auth
ENABLE_AUTH = True # If enabled, add user credentials below USERS = { "admin": "password", }
But curl say "Unauthorized Access" with this command :
curl -u admin:password http://127.0.0.1:5000/servers/ -v --digest
How do i call the server ?
Thanks Regards