six-ddc / plow

A high-performance HTTP benchmarking tool that includes a real-time web UI and terminal display
Apache License 2.0
4.12k stars 140 forks source link

Add support for basic auth #87

Closed d-g-t closed 1 year ago

d-g-t commented 1 year ago

Hello! Would be nice if you added the ability to test the routes protected by basic auth. Some of my use cases require this thing, and I have to use ab as a fallback, which is something I don't really want...

six-ddc commented 1 year ago

Plow can specify headers using -H, and BasicAuth is actually a type of header format, so it can be manually converted into user:password format using -H "Authorization: Basic base64(username:password)". The base64 calculation part can be done using some online websites such as https://www.debugbear.com/basic-auth-header-generator.

d-g-t commented 1 year ago

Well, I know that I can specify just base64 of login:password, but I thought more of options to pass them directly (e.g. -u user -p pass). But thank you anyway for rapid response!