-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

[EMAIL PROTECTED] wrote:
> I have a couple different tg apps that i want to play together. Is
> there a way to pass authentication between them so my users can login
> once and as log as the session hasn't expired they can move between
> the apps? I could combine them but for sanity sakes I like them as
> different apps.
> 
If they're all on the same domain it's possible.  In Fedora we have
three apps (and growing) that use the same session db backend and a
common cookie.  The secret is to have the app talk to two different dbs,
one for your application logic and a separate one for the TG visit and
identity information.

I had to subclass a few TG identity and visit classes to make this work
which is less than ideal as I sometimes have to update my code when a
new TG comes out.  It uses SQLAlchemy but works with apps written in
SQLObject.  The code also makes use of our account system db for
authentication but you can get most of what you need by looking at the
source code.  I'd love for the bugs that make this a requirement to be
fixed but so far they've languished because no one who knows SA and
identity well has wanted to look at my patches.  If someone looks at it
(even if it's just for 2.0) that would be great :-)

The code is under GPLv2.  If that's fine for your project, we have a
trac project with the code:
  https://hosted.fedoraproject.org/projects/python-fedora

When you browse the source you'll want to look at fassession.sql,
fedora/accounts/tgfas.py, fedora/tg/{visit,identity}.

An example of configuring an app to use it is in the README.

- -Toshio
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFG+VaUX6yAic2E7kgRAsinAKClYU7EaX0HHJSwxmuzdfBuSmI8sACfaR+1
g3dxMfpXBgDMpFsLW7ML4ds=
=rwOd
-----END PGP SIGNATURE-----

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