single sign in problem

problem:

my system sits at the main domain and it’s powered by Yii.

now there’s another system that is supposed to be built at a subdomain

and sits in a different folder powered by "pure php"

what should I do, so that the non-yii system can also use my login

credentials from the Yii system ? … got no idea :mellow:

I’m not sure if I understand. It would all depend on how you’re authenticating your logins. I don’t know how pure php works but if you’re using some sort of database login table you should just be able to point to it and run authentication methods.

If you mean you’d like to have the user log in once and have it pass credentials back and forth you may be able to do it with cookies, have both sites look at the same cookie. Theres a bit of a security risk there but its certainly better than passing things through URL query strings.

Why not porting the php in Yii?

You can create a service, as an API, in the Yii application to service the authentication needs of the other system.

yeap, that’s what I meant exactly logging-in once and passing back and forth

what do you mean porting? use yii also in the other system? if that’s what you meant, they don’t want to use a framework in the other system. I just don’t know why.

service?, can you show me a sample of a service in yii that is somehow related to my objective ?

Sure, see:

Web Service on the guide; and

How-To: Create a REST API, a very fresh wiki entry.