Opened 5 years ago

Last modified 3 years ago

#5148 enhancement new

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

Reported by: exarkun Owned by: exarkun
Priority: normal Milestone:
Component: web Keywords: httpclient agent
Cc: jknight, jesstess, GaretJax 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 (9)

comment:1 Changed 5 years ago by DefaultCC Plugin

  • Cc jknight added

comment:2 Changed 5 years ago by exarkun

  • Author set to exarkun
  • Branch set to branches/http-client-auth-5148

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

comment:3 Changed 5 years ago by exarkun

  • Branch changed from branches/http-client-auth-5148 to branches/http-client-auth-5148-2

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

comment:4 Changed 4 years ago by jonathanj

  • Keywords agent added

comment:5 Changed 4 years ago by jesstess

  • Cc jesstess added

comment:6 Changed 4 years ago by glyph

  • Author changed from exarkun to exarkun, glyph
  • Branch changed from branches/http-client-auth-5148-2 to branches/http-client-auth-5148-3

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

comment:7 Changed 4 years ago by GaretJax

  • Cc GaretJax added

comment:8 Changed 3 years ago by jonathanj

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 3 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.

Note: See TracTickets for help on using tickets.