Create A Yii Session For A Specific User From A Desktop Application?

Hi all,

Please forgive me if this sound bit vague.

Say I have a desktop application written in Java or c# , and that have 10 buttons (user1 ,user2…user10).

When I click each button I need to open up a browser window with the specific user (who is allocated for that button) already logged in.

Each time I click a button I want previous sessions to expire and only keep the most recent session.

Is it possible to achieve above web section from Yii?

Sorry for being vague, if someone can help me with bit of pointers then I can do further reading on them.

Yes it’s possible, but there are some questions about how to store user’s credentials.

For example: if you store login & pwd inside your desktop app, then clicking your button can execute POST request to login API action. Since this is very weird (what happens if some users change their passwords), you should think about how you can identify user.

Thanks, both desktop application and Yii app will have access to same database which contains user login details

is below the correct way to do this?

  1. create HTTP header with user login details.

  2. fire up Browser , remove any previous user sessions

  3. login new user with created http header

or is there a simple way since both have access to the same database?

Seems like sending header is the simplest.