Skip to Content.
Sympa Menu

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

Subject: The mailing list for listmasters using Sympa

List archive

Chronological Thread  
  • From: Serge Aumont <address@concealed>
  • To: Chris Hastie <address@concealed>
  • Cc: address@concealed
  • Subject: Re: [sympa-users] Authenticating to Sympa from an external PHP application
  • Date: Wed, 21 May 2008 11:21:07 +0200

Chris Hastie wrote:
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.
Great ! That's a good contrib I have added in the contrib section : http://www.sympa.org/contribs/ .

We will add soap feature to allow :

* Sympa session creation from other application (the service will return the cookie to be sent to the remote client)
* Use of existing Sympa session from other application (input a sympasession cookie, output the user email if any)
* close an existing Sympa session (logout) from a remote application (input an a sympasession cookie, erase user email in session table)

Serge



Archive powered by MHonArc 2.6.19+.

Top of Page