Tesla.Middleware.DigestAuth (tesla v1.4.0) View Source
Digest access authentication middleware
NOTE: Currently the implementation is incomplete and works only for MD5 algorithm and auth qop.
Example
defmodule MyClient do
use Tesla
def client(username, password, opts \ %{}) do
Tesla.client([
{Tesla.Middleware.DigestAuth, Map.merge(%{username: username, password: password}, opts)}
])
end
end
Options
:username
- username (defaults to""
):password
- password (defaults to""
):cnonce_fn
- custom function generating client nonce (defaults to&Tesla.Middleware.DigestAuth.cnonce/0
):nc
- nonce counter (defaults to"00000000"
)