LukeMathWalker / wiremock-rs

HTTP mocking to test Rust applications.
Apache License 2.0
617 stars 70 forks source link

Add matchers for Basic and Bearer Authorization types #96

Closed chaosteil closed 2 years ago

chaosteil commented 2 years ago

This adds support for matching Basic and Bearer auth types, as I find myself reaching for that occasionally and would like to support it in this library as well. Additionally, basicAuth at least is supported in the existing Wiremock in Java, so I feel it's not fully philosophically distant.

I've omitted documentation and doctests for now. If the general implementation is okay I'll write up something nice.

LukeMathWalker commented 2 years ago

This would definitely be a great addition to the crate 👍🏻

chaosteil commented 2 years ago

Updated with docs and doctests, had to bump surf for dev-dependencies so surf::Config is available.