lib/Middleware/DigestAuthMiddleware.php
public function handleResponse(RequestInterface $request, ResponseInterface $response, callable $next)
    {
        $this->parseServerHeaders($response);

        return $next($request, $response);
    }
public function handleResponse(RequestInterface $request, ResponseInterface $response, callable $next)
    {
        $this->parseServerHeaders($response);

        return $next($request, $response);
    }
Passes the returned server headers to parseServerHeaders() to check if any authentication variables need to be set.
Inteprets the returned status code and attempts authentication if status is 401 (Authentication Required) by resending
the last request with an Authentication header.