1

Login as User

Тема: Login as User

I want to login to the system on behalf of other user

For example: login to user "childuser" from the user "mainuser" using login as feature. after logged into system(http://dev.hosting.wialon.com/),at top right corner it should show like "mainuser(childuser)"

Is there any Remote API to achieve this? Currently I'm using below API.

https://sdk.wialon.com/wiki/en/sidebar/ … /duplicate

params: {"operateAs":"childuser","continueCurrentSession":true}
sid: <sessionID of mainuser>

In the Result I will get one session ID, using this sessionID, I'm forming the URL like below. It will login successfully. But at top right corner it is showing like "mainuser" instead of showing "mainuser(childuser)"

http://dev.hosting.wialon.com/?sid=<sessionID>

Please let me know if I'm doing anything wrong here

Thanks
J Prabhu
2

Login as User

Re: Login as User

All is ok, but when you open url ?sid=<sessionID>, Hosting does core/duplicate again, that leads to login as mainuser.

You can use ?sid=<sessionID>&operate_as=childuser.

3

Login as User

Re: Login as User

Thanks for your response. I have one more query. In below url, which session ID I should use? is it mainuser or childuser session ID ? Is it necessary to use core/duplicate API?


?sid=<sessionID>&operate_as=childuser.

Thanks
J Prabhu
4

Login as User

Re: Login as User

prabhu.janakiraman пишет:

Thanks for your response. I have one more query. In below url, which session ID I should use? is it mainuser or childuser session ID ? Is it necessary to use core/duplicate API?

?sid=<sessionID>&operate_as=childuser.

Session ID can be from any user, that have access to childuser. core/duplicate is not necessary, if you are using this url, it will do core/duplicate by itself.

5

Login as User

Re: Login as User

Thanks rual.

Thanks
J Prabhu