Sippet v1.0.4 Sippet.DigestAuth View Source
Implements the Digest authentication protocol.
Link to this section Summary
Functions
Adds an Authorization
or Proxy-Authorization
header for a request after
receiving a 401 or 407 response. CSeq
must be updated after calling this
function.
Link to this section Types
Link to this section Functions
Link to this function
make_request(outgoing_request, incoming_response, authenticate, options \\ [])
View Sourcemake_request( outgoing_request :: Sippet.Message.request(), incoming_response :: Sippet.Message.response(), (realm() -> {:ok, username(), password()} | {:error, reason()}), options() ) :: {:ok, Sippet.Message.request()} | {:error, reason()}
Adds an Authorization
or Proxy-Authorization
header for a request after
receiving a 401 or 407 response. CSeq
must be updated after calling this
function.
incoming_response
must be an incoming 401/407 response containing a single
challenge header (either Proxy-Authenticate or WWW-Authenticate) and
outgoing_request
is the last request sent to the server. The passed
function receives the realm and should return {:ok, username, password}
or
{:error, reason}
.