PSPDFKit-labs/bypass

Can Bypass be used for API calls that use Digest Auth?

開放

#84 建立於 2019年11月13日

 (2 則留言) (0 個反應) (0 位負責人)Elixir (89 個分叉)batch import
help wanted

倉庫指標

星標
 (847 顆星)
PR 合併指標
 (30 天內沒有已合併 PR)

描述

I'm trying to use Bypass in my tests to return two different responses in quick succession. The only difference between the two requests is the Authentication headers; I may be wrong, but from reading the docs it doesn't look like Bypass differentiates responses based on this?

The reason for this is because the API I'm trying to test an API that relies on Digest Authentication, where an initial call to the endpoint returns a 401 Unauthorized with a nonce and realm. The second call involves using this nonce and realm, along with credentials to authenticate, after which a 200/201 is returned.

Is this something I can test with Bypass, or should I use something like Mox instead?

貢獻者指南