views:

229

answers:

2

hi,

can somebody explain steps i should follow to implement SSO on php based website. e.g user logs in to www.siteA.com and when he goes to www.siteB.com he should be already logged in. (in my case). how siteB would identify user? does user has to enter openid again?

+1  A: 

Maybe try this tutorial.

Eric J.
thanks a lot guys for your support. requirement of my client is to use openid as SSO solution. means if he logins to siteA with openid then he should appear as logged-in at siteB. siteA and siteB are on different domains. can this be the solution that i create a cookie on openid login success, this cookie would have user's openid. then when user visits siteB i check for cookie if its there he is logged in. please correct me if i am wrong.
+5  A: 

Take a look at Simple Single Sign-On for PHP.

OpenID isn't quite the same thing. Single-sign-on is about logging on in one place and having that authenticate you at other locations automatically. OpenID is about delegating authentication to an OpenID provider so you can effectively log on to multiple sites with the one set of credentials.

It's worth noting that StackOverflow uses OpenID to associate a user between different sites. Is this what you mean? Because that's not SSO as you need to separately log on to each site. Also, some OpenID providers (notably Google) don't play ball in the sense that they don't send the same identifier to each site so you have no way of knowing that a token on each site originates from the same set of credentials.

You could use OpenID as your authentication scheme for SSO but that's incidental.

cletus