authenticate method has inconsistent return values

Bug #990100 reported by Sam Bull
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pySAML2
New
Undecided
Unassigned

Bug Description

If the binding is HTTP POST, the return value is a 2-tuple: session_id and the HTML body. If the binding is HTTP redirect, the return value is session_id and the location header.

It means that the code that calls authenticate needs to know which binding is used so that it can do the right thing with the return data.

I think it would make more sense to return session_id, headers and response body.

Also, there's an ominous comment in the code for handling the HTTP POST binding:

{{{
            # No valid ticket; Send a form to the client
            # THIS IS NOT TO BE USED RIGHT NOW
}}}

I don't understand what this means and if I can safely use pysaml2 with this binding.

Revision history for this message
Roland Hedberg (roland-hedberg) wrote : Re: [Bug 990100] [NEW] authenticate method has inconsistent return values

27 apr 2012 kl. 22:50 skrev Sam Bull:

> Public bug reported:
>
> If the binding is HTTP POST, the return value is a 2-tuple: session_id
> and the HTML body. If the binding is HTTP redirect, the return value is
> session_id and the location header.
>
> It means that the code that calls authenticate needs to know which
> binding is used so that it can do the right thing with the return data.
>
> I think it would make more sense to return session_id, headers and
> response body.

I agree!

> Also, there's an ominous comment in the code for handling the HTTP POST
> binding:
>
> {{{
> # No valid ticket; Send a form to the client
> # THIS IS NOT TO BE USED RIGHT NOW
> }}}
>
> I don't understand what this means and if I can safely use pysaml2 with
> this binding.

I've never encountered a situation where I have had to use HTTP POST so
I've not spent time on making it seamless to use pysaml2 in that context.
Obviously you are the first one that has asked for this.

This means that there are some but no way complete support.
A short browse shows me some support for constructing and sending but nothing for receiving and parsing the response.
Since it's not that different from the SOAP binding which I do support, it shouldn't be that hard to do.

I'll fix this in a day or two.

-- Roland
------------------------------------------------------
Roland Hedberg
IT Architect/Senior Researcher
ICT Services and System Development (ITS)
Umeå University
SE-901 87 Umeå, Sweden
Phone +46 90 786 68 44
Mobile +46 70 696 68 44
www.its.umu.se

Revision history for this message
Sam Bull (osirius) wrote :

Thanks for the prompt response!

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.