Opened 10 years ago

Last modified 3 months ago

#5148 enhancement new

Support HTTP authentication for with twisted.web.client.Agent

Reported by: Jean-Paul Calderone Owned by: Jean-Paul Calderone
Priority: normal Milestone:
Component: web Keywords: httpclient agent
Cc: jknight, jesstess, Jonathan Stoppani Branch: branches/http-client-auth-5148-3
branch-diff, diff-cov, branch-cov, buildbot
Author: exarkun, glyph


There could be a wrapper for Agent, say AuthenticationAgent, which knows how to respond to WWW-Authenticate headers in 401 (Unauthorized) responses by looking up some credentials appropriate to the request and re-issuing it with a properly formatted Authorization header.

Change History (10)

comment:1 Changed 10 years ago by DefaultCC Plugin

Cc: jknight added

comment:2 Changed 10 years ago by Jean-Paul Calderone

Author: exarkun
Branch: branches/http-client-auth-5148

(In [32117]) Branching to 'http-client-auth-5148'

comment:3 Changed 10 years ago by Jean-Paul Calderone

Branch: branches/http-client-auth-5148branches/http-client-auth-5148-2

(In [32268]) Branching to 'http-client-auth-5148-2'

comment:4 Changed 8 years ago by Jonathan Jacobs

Keywords: agent added

comment:5 Changed 8 years ago by jesstess

Cc: jesstess added

comment:6 Changed 8 years ago by Glyph

Author: exarkunexarkun, glyph
Branch: branches/http-client-auth-5148-2branches/http-client-auth-5148-3

(In [38455]) Branching to 'http-client-auth-5148-3'

comment:7 Changed 8 years ago by Jonathan Stoppani

Cc: Jonathan Stoppani added

comment:8 Changed 8 years ago by Jonathan Jacobs

It's worth mentioning that one particularly tricky hurdle here is body producers may not be restartable (and keeping a copy of the body is not always feasible), 100 Continue support would avoid this problem but only for servers that support it.

Perhaps tubes will allow this behaviour to be implemented in a useful way.

comment:9 Changed 8 years ago by Glyph

Tubes aren't any more restartable than producers are. What we want is to have a callable that produces a (tube | producer); tubes do have a slightly cleaner way of setting that up, though.

comment:10 Changed 3 months ago by Tom Most

treq has a crude version of this feature. It blindly sends the credentials on every request.

Note: See TracTickets for help on using tickets.