I'll toss in a note for tgext.xmlrpc here. Your entire XMLRPC hierarchy
becomes something that looks and feels much more like regular TurboGears
code, and your individual methods don't have to deal with parsing XML at
all: That's all handled at a lower level, before your code gets called.

As for how it helps with the above issue? login information simply becomes
parameters, and they are fully parsed out. No need to struggle with it at
all.

http://bitbucket.org/pedersen/tgext.xmlrpc/

On Tue, Jun 8, 2010 at 5:20 AM, Gustavo Narea <[email protected]> wrote:

> The point I'm trying to make is that this kind of things can perfectly be
> done with repoze.who, without bringing any hack to the authorization
> controls like that @xrequire decorator or the other things you suggested.
>
> Want to get the credentials from the  body instead of the POST arguments?
> Fine, simply change the following lines:
>
>       request = Request(environ)
>       if "login" in request.POST and "password" in request.POST:
>           credentials = {
>               'login': request.POST['login'],
>               'password': request.POST['password'],
>               }
>
> to:
>       parsed_xmlrpc = parse_it(environ['wsgi.input'])
>       if "login" in parsed_xmlrpc and "password" in parsed_xmlrcp:
>           credentials = {
>               'login': parsed_xmlrpc['login'],
>               'password': parsed_xmlrpc['password'],
>               }
>
> That simple.
>
> --
> You received this message because you are subscribed to the Google Groups
> "TurboGears" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<turbogears%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/turbogears?hl=en.
>



-- 
Michael J. Pedersen
My IM IDs: Jabber/[email protected], ICQ/103345809, AIM/pedermj022171
         Yahoo/pedermj2002, MSN/[email protected]

-- 
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en.

Reply via email to