tags:

views:

42

answers:

3

I'm using TurboGears with PyAMF behind a Flex client, and everything works well.

What I want to do is expose just a AMF login method to the world, and only allow access to other AMF functions once the user has logged in.

Also, once the user is known, I'd like the protected AMF methods to get the username from the auth information, so not every function has to start with the user_id.

Is there support for this sort of integration out there anywhere?

A: 

I have not done it, but I happened to have this bookmarked the other day via del.icio.us.

Hope it helps.

Using PyAMF With TurboGears 2

tehsilverdollar
That's a good write-up, but it doesn't handle keeping anything private, or logging in with credentials.
Jim Carroll
Along the lines of that you should be able to create a login service in front of the rest of your services to provide authentication and keep things private. Sorry I can't post any samples of this, but I can tell you that is how I currently handle this.
tehsilverdollar
A: 

I ended up spending over a day hitting the /login url with html posts until it all worked. I couldn't use the repoze.who mechanism from within the Amf controller.

I don't think I'll choose Turbogears for my next project though... there have been problems with setup every time I've set it up, and having to do work-arounds like this is just because it's not a well thought out architecture.

Jim Carroll
A: 

Did you read this?

http://blog.pyamf.org/2008/01/authentication

hadrien
Thanks, that's good to know. I'll take a closer look and see if that integrates with turbogears Repose.Who and sets up the TG2 authentication tokens.
Jim Carroll