alfg / murmur-rest

:headphones: A RESTful API for administering virtual Mumble servers. Built with Flask and Ice.
https://github.com/alfg/murmur-rest
79 stars 34 forks source link

Digest authentification #17

Closed Elithrin closed 8 years ago

Elithrin commented 8 years ago

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

Elithrin commented 8 years ago

Here the detail

curl -u admin:password http://127.0.0.1:5000/servers/ -v

Elithrin commented 8 years ago

The same with --digest

curl -u admin:password http://127.0.0.1:5000/servers/ -v --digest

alfg commented 8 years ago

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.

Elithrin commented 8 years ago

Thanks ! All is good !