Skip to content

Allow custom authentication (in particular NTLM) to proxies  #1582

@hickford

Description

@hickford

Requests can do many kinds of authentication—basic, digest, OAuth1. Even better, the great API allows users to specify a custom authentication class

import requests
from requests_ntlm import HttpNtlmAuth

 requests.get("http://ntlm_protected_site.com",auth=HttpNtlmAuth('domain\\username','password'))

However for proxies, the only authentication presently supported is Basic. The API doesn't allow you to specify other or custom classes. http://docs.python-requests.org/en/latest/user/advanced/#proxies

To use HTTP Basic Auth with your proxy, use the http://user:password@host/ syntax:

Please could you expand the API to allow custom authentication for proxies too?

This would be mega useful. NTLM proxies are common in Windows corporate networks. Python development can't get off the ground in my office because the package manager (and everything else) falls over at the proxy. Examples

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions