Skip to Content.
Sympa Menu

en - [sympa-users] Authenticating to Sympa from an external PHP application

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: Chris Hastie <address@concealed>
  • To: address@concealed
  • Subject: [sympa-users] Authenticating to Sympa from an external PHP application
  • Date: Wed, 21 May 2008 09:32:59 +0100

The change in Sympa from using a 'sympauser' cookie to sessions has made
it more difficult to arrange for authentication to be handled by
external applications. Should it help any one else affected by this, the
attached is a hack I put together to enable an existing PHP application
to set Sympa's session cookie. Obviously all the authentication logic is
handled by the PHP app. Once that is satisfied that the user should be
authenticated to sympa it can use this class to make the appropriate
updates to sympa's session_table, then set a cookie:

include ('SympaSession.php');
$ss = new SympaSession($email);
$sympa_session_id = $ss->getid();
setcookie("sympa_session", $sympa_session_id, 0, '/',
$sympa_session_domain, FALSE);

It suits my purposes, but is not hugely flexible. See it as an example
to be modified, not a fully tested and guaranteed working class.

Cheers

Chris

Attachment: SympaSession.php.tar.gz
Description: GNU Zip compressed data




Archive powered by MHonArc 2.6.19+.

Top of Page