Skip to content

Commit

Permalink
Improve documentation of netrc authentication
Browse files Browse the repository at this point in the history
The documentation does not make it clear that when the credentials
from netrc are used, Requests authenticates with HTTP Basic Auth.

I just spent ages trying to figure out why it wasn't working, and
it was because although the credentials in the netrc were correct,
the server actually required HTTP Digest Auth.

Add a section in the authentication documentation to make it clear
that HTTP Basic Auth is used.
  • Loading branch information
dpursehouse committed Jul 19, 2013
1 parent 3229365 commit 6f6a920
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions docs/user/authentication.rst
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,17 @@ For more information on how to OAuth flow works, please see the official `OAuth`
For examples and documentation on requests-oauthlib, please see the `requests_oauthlib`_ repository on GitHub


netrc Authentication
--------------------

If no authentication method is given with the ``auth`` argument, Requests will
attempt to get the authentication credentials for the URL's hostname from the
user's netrc file.

If credentials for the hostname are found, the request is sent with HTTP Basic
Auth.


Other Authentication
--------------------

Expand Down

0 comments on commit 6f6a920

Please sign in to comment.