Ian Cordasco
677bbe30d7
Move noncebit to the only place it is used
...
Since we only allow for "auth" qop-value, hardcode it
Fixes #2408
2015-01-19 18:50:50 -06:00
Ian Cordasco
86c3ecfd34
Fix bug in renegotiating a nonce with the server
...
If a session runs long enough (without constant activity) then the server can
expire the nonce the session has negotiated. If that happens the session will
get a new 401 response which we were immediately returning to the user. A user
would then have to essentially reinitialize session.auth each time they get an
unexpected 401.
Also, there's no need for setattr calls when we can simply assign the
attribute on the instance.
2014-12-23 10:40:31 -06:00
Akira Kitada
67c505781c
Fix HTTPDigestAuth not to treat non-file as a file
...
Ensure pos is set to None when the body is not a file
so that HTTPDigestAuth detects the type of the body correctly.
2014-11-13 00:51:35 +09:00
Yossi Gottlieb
3d8823cafc
Clean up handle_redirect.
2014-10-23 13:46:44 +03:00
Yossi Gottlieb
6ff6f756c0
Clean up, support all redirects, fix potential endless 401 loop.
2014-10-08 00:06:01 +03:00
Yossi Gottlieb
c28da22e9c
A fix for #1979 repeat HTTP digest authentication after redirect.
2014-09-27 21:05:59 +03:00
Cory Benfield
2b8353d3b3
Avoid unnecessary encode/decode cycles.
2014-06-08 10:28:35 +01:00
Cory Benfield
d977ee8a24
Force basic auth strings to native string type
2014-06-08 10:20:32 +01:00
Martijn Pieters
488b90f5ac
Remove unused loggers.
2014-02-03 13:43:59 +00:00
Ian Cordasco
e8bdcdb0a7
Address feedback from #1729
...
- Make the PreparedRequest's cookie jar an implementation detail
2013-12-04 06:45:18 -06:00
Chase Sterling
8bfe0d873f
Store the request cookiejar in PreparedRequest.cookies fix #1728
...
Conflicts:
requests/sessions.py
2013-12-04 06:38:58 -06:00
Cory Benfield
fecb35a08e
Quote qop values in digest auth.
2013-11-29 08:37:25 +00:00
Akira Kitada
3a9d9f2279
Fix hangs on streaming uploads with HTTPDigestAuth
...
When using Digest Authentication, the client resends the same request
after the server responds with the 401 "Unauthorized". However, when
doing streaming uploads, it gets stuck because the body data (a
file-like object) is already consumed at the initial request.
The patch fixes this by rewinding the file-like object before
resending the request.
2013-11-25 22:29:53 +09:00
daftshady
6931bd6715
second commit : Fixed #1623 . Added 'MD5-sess' algorithm to HTTPDigestAuth
2013-10-26 18:14:19 +09:00
Ian Cordasco
22e31b4b73
Handle case when WWW-Authenticate returns multiple qops
...
In Digest Access Authentication there are two possible values (four if you
count the not-present and both cases) for authentication. We were narrowly
handling one of the four cases. Now we handle two.
2013-09-13 22:29:42 -05:00
Ian Cordasco
286ddb672d
Take advantage of the new copy method
2013-07-27 23:08:46 -04:00
Ian Cordasco
c25a72ea24
Make the regular tests pass
...
I broke Digest Auth completely
2013-07-27 23:07:25 -04:00
Ian Ross and Ian Cordasco
73635df1b2
Start work on sending cookies back
...
On 401's the cookies received aren't sent back to the server. See: #1336
2013-07-27 23:07:25 -04:00
Thomas Weißschuh
3b0d8b8e39
don't replace 'Digest' in digest header value
...
See https://github.com/kennethreitz/requests/issues/1358
2013-05-21 17:48:30 +00:00
Kenneth Reitz
a527ecfabd
Merge pull request #1242 from oviboy/master
...
HTTP Digest Auth case insensitive replacement of "Digest "
2013-04-13 20:28:43 -07:00
Pascal Borreli
037b38badb
Fixed typos
2013-04-01 18:02:18 +00:00
Ovidiu Negrut
9d16c72767
compiled regex expression in digest auth, this also works in python 2.6.x
2013-03-25 12:28:25 +02:00
Ovidiu Negrut
e752455b6f
Digest auth: case insensitive replacement of 'digest ' string with '' from WWW-Authenticate
2013-03-11 10:28:37 +02:00
Michael Komitee
d0285fac42
Use user supplied options when resending authenticated requests
...
Hooks sometimes have to send requests (e.g. when responding to a 401 during
authentication).
All keyword arguments should be passed along when hooks are dispatched so that
if a user wanted to use a timeout, stream, specify a cert location with the
verify flag, etc, their specification can be followed.
2013-02-13 19:11:38 -05:00
oczkers
40a060cf57
it`s more pep8 now
2013-01-27 02:04:12 +01:00
Kenneth Reitz
440aeca5d4
Merge pull request #1123 from andrewjesaitis/master
...
Fixes DigestAuth with Sessions
2013-01-25 21:00:33 -08:00
Andrew Jesaitis
34268b16c3
Moves num_401_calls counter to HTTPDigestAuth
2013-01-23 10:32:56 -07:00
Juan Riaza
a6360ca134
missing algorithm field
2013-01-22 16:35:16 +01:00
Andrew Jesaitis
03893d9b7f
Fixes repeated 401s when using DigestAuth with a session
2013-01-21 16:34:11 -07:00
Ian Cordasco
68d394952a
A bit of linting.
...
Mostly removed a whole bunch of unused imports.
2012-12-17 20:19:11 -05:00
Kenneth Reitz
4837900832
digest works!
...
added some nice backwards compatible stuff too
2012-12-17 04:55:58 -05:00
Kenneth Reitz
1c30ef453b
remove old auth stuff
2012-12-17 04:33:13 -05:00
Kenneth Reitz
377078b0f5
hooks and things
2012-12-17 04:31:26 -05:00
Matt McClure
f69934fb24
Import oauthlib without the obsolete wrapper.
...
Fixes #1000 .
2012-12-12 10:45:00 -05:00
Matt McClure
f02573f743
Sign requests even if they have no body data.
2012-11-27 13:12:21 -05:00
Cory Benfield
31f74bd02e
Make OAuth handle less-common body data better.
...
Related to Issue #910 . Specifically, OAuth won't sign the request unless
it gets a body type that is urlencoded or multipart. This is overly
restrictive. The correct behaviour is to sign the message without
including the body as part of the signature.
2012-11-24 21:17:29 +00:00
Radu Voicilas
820dfb0495
Making the code more PEP8 compliant
2012-10-09 00:42:49 +03:00
ayanamist
babac7368b
Change variable name "_cond" -> "_oauth_signed".
2012-08-28 15:38:13 +08:00
ayanamist
aded42f232
Try to keep the header too if content-type is application/x-www-form-urlencoded
2012-08-28 15:24:09 +08:00
ayanamist
46ff4b3862
Fix the comment too.
...
If content-type is multipart/form-data, keep the header.
2012-08-28 15:20:53 +08:00
ayanamist
8a1d53eb3a
Correct OAuth1 with query or data.
2012-08-28 12:52:32 +08:00
Kenneth Reitz
f65b790e9d
Cleanup #800
2012-08-25 10:44:53 -04:00
ayanamist
301d1a838f
Fix kennethreitz/requests#790
2012-08-20 17:18:26 +08:00
Peter Montagner
5017aeb06c
Save credentials in the HTTPDigestAuth object and replay them if the user reuses the object.
2012-08-18 14:31:24 +10:00
Peter Montagner
53d454c813
Release connection in digest auth 401 handler to allow the connection to be reused.
2012-08-18 12:53:57 +10:00
Locker537
42d0a2169e
Whitespace fixes following PEP8.
2012-08-16 17:38:35 -04:00
Kenneth Reitz
e0fed46561
Solves #722
2012-07-27 01:48:25 -04:00
Kenneth Reitz
bc63617da2
Merge pull request #647 from mkomitee/kerberos
...
Implement GSSAPI/Kerberos authentication for requests
2012-07-26 22:36:41 -07:00
Victoria Mo
5296b8be90
Fix infinite loop on wrong Digest Authentication (Issue #547 )
...
Modified code to use the current fix versus the old fix, which was broken.
Co-Authored By: Timnit Gebru <tgebru@gmail.com >
Co-Authored By: Sarah Gonzalez <smar.gonz@gmail.com >
Co-Authored By: Leila Muhtasib <muhtasib@gmail.com >
2012-07-14 16:09:13 -04:00
Kenneth Reitz
a1fd038d2c
vendored oauthlib
2012-06-28 17:20:26 -07:00