Forums / Developer / SSO With eZ publish

SSO With eZ publish

Author Message

Brijesh Tekrawala

Thursday 10 February 2011 3:14:44 am

Hi All,

I am creating SSO handler for my applicaiton, is there any sample code available for below

to create user

authenticate user

redirect to home page of ez publish

Matthieu Sévère

Thursday 10 February 2011 3:27:39 am

Hi,

You should have a look at this project : http://projects.ez.no/janrainauth

It doesn't use a SSO handler but you have example code to login and create users.

Cheers

--
eZ certified developer: http://ez.no/certification/verify/346216

Brijesh Tekrawala

Thursday 10 February 2011 4:35:40 am

I have another site available and need to setup SSO from there. can someone please send sample code for SSOHandler ?

B Pierre

Friday 11 February 2011 7:26:31 am

In french : http://www.lolart.net/blog/ez-publish/utilisation-d-un-sso-dans-ez-publish

In english : http://share.ez.no/learn/ez-publish/using-a-sso-in-ez-publish

A simple sample :

"

public function handleSSOLogin()
{
$currentUser = false; // Valeur par defaut que l'on retourne si l'authentification échoue

//Si un utilisateur est authentifié on le récupère.
if (phpCAS::checkAuthentication())
{
$currentUser = eZUser::fetchByName(phpCAS::getUser());

//Si l'utilisateur n'est pas connu dans eZPublish
if(!is_object( $currentUser ))
{
$currentUser=false;
}
}

return ($currentUser);
}

"