Testing basic http authenticaation with digest using curl

How can we test authentication with digest as explained here using curl?

I am able to test Simple Basic example by setting Authorization header to Basic {SECRET} where SECRET is Base64::encode64("username:password") as explained here

I tried sending Authentication header with same value but getting NoMethodError (undefined method 'unpack' for nil:NilClass) on line having call authenticate_or_request_with_http_digest

Would anyone please explain what I am doing wrong here?

Answers


Finally I am able to fix the problem. Here is how I used curl to test http basic authentication with digest

curl --data {"red":"00"} --digest -u "username:password" "http://localhost:3000/api/statistics"

Need Your Help

Filtering by exact list of IDs instead of “in_” list of IDs

python sqlalchemy

Item has one-to-many relation with Condition. I need to query all the Items that have exactly this list of Conditions (no subset, no superset).

remove/add pagination buttons

php jquery ajax button pagination

I have a blog.Few articles inside.Per each article I have a lot of comments that I decide to paginate in group of 5 (let's say..if i have 15 comments i have 3 pagination buttons).

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.