edgeport - v1.0.3
    Preparing search index...

    Function computeDigestResponse

    • Computes the Authorization / Proxy-Authorization header value for a Digest challenge.

      Implements RFC 2617 (MD5, MD5-sess) and RFC 7616 (SHA-256, SHA-256-sess) with qop=auth, falling back to the legacy RFC 2069 construction when the server offers no qop.

      Parameters

      • params: DigestParams

        Credentials, the request method/URI, and the parsed challenge.

      Returns Promise<string>

      The full Digest ... header value to send back.

      If the challenge names an unsupported algorithm.

      1.0.3

      import { computeDigestResponse, parseChallenge } from 'edgeport/sip';

      const header = await computeDigestResponse({
      username: 'alice',
      password: 'secret',
      method: 'REGISTER',
      uri: 'sip:example.com',
      challenge: parseChallenge(wwwAuthenticate)
      });