private function isValid(array $authorization, string $method, string $password): bool
    {
        $validResponse = md5(sprintf(
            '%s:%s:%s:%s:%s:%s',
            md5(sprintf('%s:%s:%s', $authorization['username'], $this->realm, $password)),
            $authorization['nonce'],
            $authorization['nc'],
            $authorization['cnonce'],
            $authorization['qop'],
            md5(sprintf('%s:%s', $method, $authorization['uri']))
        ));

        return $authorization['response'] === $validResponse;
    }