Skip to content

DigestAuth not working #2385

Closed
Closed

Description

@skewty

Not Working

import httpx

print(httpx.get("http://192.168.12.26/polling/deviceHandler", auth=httpx.DigestAuth("httpx", "test")).text)
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head><title>401 Unauthorized</title></head><body>
Authorization failed.
</body></html>

Working

curl --digest -u 'httpx:test' http://192.168.12.26/polling/deviceHandler

or

import requests.auth

print(requests.get("http://192.168.12.26/polling/deviceHandler", auth=requests.auth.HTTPDigestAuth("httpx", "test")).text)

output

<PolycomIPPhone>
<DeviceInformation>
<MACAddress>00907a1472b2</MACAddress>
<PhoneDN>Line1:2008</PhoneDN>
<AppLoadID>6.2.2.2238 11-Mar-20 16:50</AppLoadID>
<UpdaterID>6.2.2.2238</UpdaterID>
<ModelNumber>Spectralink 8440</ModelNumber>
<TimeStamp>2022-09-30T12:53:40-08:00</TimeStamp>
</DeviceInformation>
</PolycomIPPhone>

If unable to reproduce and you'd like me to put in some breakpoints / capture some context / state please let me know.

Activity

  1. locked and limited conversation to collaborators on Oct 3, 2022
  2. converted this issue into a discussion #2392 on Oct 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions