Indeed, my memory fooled me, In my memories I did an http digest auth
just using only suds material but looking back I actually also used
some magic from urllib2.
Since I'm never wrong cause, I could argue that we don't even know
what the dude wants : (s)he tells us that (s)he must achieve an http
digest auth, but want to use an http basic auth header. He ?
Anyway, for the digest, if that's what you need, here is how to do it :
import urllib2
import suds
import suds.client
t = suds.transport.https.HttpAuthenticated(username='mylogin',
password='pypassword')
t.handler = urllib2.HTTPDigestAuthHandler(t.pm)
t.urlopener = urllib2.build_opener(t.handler)
;, transport=t)
On Mon, Jul 15, 2013 at 3:03 PM, Dave Bonner <dbonner(a)cogolabs.com> wrote:
Dude, if you're going to snark the response, at least make sure
to pick ALL
the nits.
That's HTTP basic auth, not digest.
:)
On Mon, Jul 15, 2013 at 6:16 AM, Mathieu Dupuy <deronnax(a)gmail.com> wrote:
>
> I'll reply since no one seem to be willing to do. And this for many
> reasons :
> 1. your question is somewhat unrelated to the mailing list. Your
> question concerns the kinda transport layer, HTTP, and not the data
> layer and library this mailing list is about, Suds and SOAP.
> 2. about your question, is it really simple, and, no offense, kinda
> silly, meaning you have a poor comprehension of what you're doing
> and/or you didn't searched or learned enough before asking, meaning
> giving you help is not worth it.
> 3. The documentation already contains the reply to your question,
> taking time to answer isn't worth it.
>
> Anyway, I'll give you help for that one :
> We know what a http digest authent is, and no you do not need to add
> the header yourself, it's all handled by the underlying http library
> that soap uses.
> Just use the http.transport.https class, it will do what you want.
> Something like :
>
> from suds.transport.https import HttpAuthenticated
> t = HttpAuthenticated(username='mylogin', password='mypassword')
> client = Client(url, transport=t)
>
> Our time is for all of us precious, if you expect an answer, make a
> good question.
> Cheers,
>
> On Wed, Jul 10, 2013 at 4:49 PM, daniele visaggio
> <visaggio.daniele(a)gmail.com> wrote:
> > Hi all,
> >
> > I need to run some soap queries against an https server that supports
> > digest
> > authentication.
> >
> > Suds version: 0.4.1 (beta) build: R703-20101015 on Ubuntu 12.04
> >
> > Basically I need to add an header to the outgoing request formatted in
> > this
> > way:
> >
> > Authorization Basic username:passwordBase64Encoded
> >
> > What is the simpler way to do this in python?
> >
> > Thank you in advance,
> >
> > Daniele
> >
> >
> > _______________________________________________
> > suds mailing list
> > suds(a)lists.fedoraproject.org
> >
https://admin.fedoraproject.org/mailman/listinfo/suds
> _______________________________________________
> suds mailing list
> suds(a)lists.fedoraproject.org
>
https://admin.fedoraproject.org/mailman/listinfo/suds
--
david bonner // dbonner(a)cogolabs.com