On Tue, Apr 26, 2011 at 3:40 PM, Ryan Parrish <[email protected]> wrote:

> What I have written so far is proof of concept for the controllers
> hitting the web service with hard coded credentials, and an
> IAuthenticator plugin that hits a URL at the web service that will
> return the users UID or a HTTP 401 depending on if the passed
> credentials are accepted.  What I'm stumped at now is how to hold onto
> the passed credentials for the duration of the session so that future
> requests made to the web service can reuse the already known good
> credentials.  I have written an IMetadataProvider that (i think)
> should save the user and password, and I see them in the stdout when I
> do a print statement within the code, however they are no longer there
> when the request finally makes its way to the post_login controller.
>

If I'm understanding your application's flow correctly, then it's saving the
data in the login form. Once that's done, the browser is redirected to
/post_login, which is a new request to the TG instance, which produces a new
request object. The end result, of course, being what you are seeing: No
saved data.

Now, how to save between? I can't guarantee this will work, but it should:
Use beaker and save the information in their session. From there, in
/post_login, you should now be able to retrieve the saved information using
the session, and get what you are expecting.

-- 
Michael J. Pedersen
My IM IDs: Jabber/[email protected], ICQ/103345809, AIM/pedermj022171
          Yahoo/pedermj2002, MSN/[email protected]
My LinkedIn Profile: http://www.linkedin.com/in/michaeljpedersen

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