Impersonating another user

Posted By Supermac Tue 23 May 2017
Add to Favorites0
Author Message
Supermac
 Posted Tue 23 May 2017
Supreme Being

Supreme Being - (71,627 reputation)Supreme Being - (71,627 reputation)Supreme Being - (71,627 reputation)Supreme Being - (71,627 reputation)Supreme Being - (71,627 reputation)Supreme Being - (71,627 reputation)Supreme Being - (71,627 reputation)Supreme Being - (71,627 reputation)Supreme Being - (71,627 reputation)

Group: Forum Members
Last Active: Wed 22 Jul 2020
Posts: 153, Visits: 874
I need to grant an access to an user (an agent) that has then to select one of his customers and navigate the site/see prices/create orders as he was that customer...

Lets say that I got both agent and customers stored in Kartris' users table and that I can already link agent with his customers: agent could decide to create an order for one of his customer selecting customer's name from a dropdown list (I don't want to give agent all customers' username and pwd and tell him to log in again using credentials of customer)... after that operation agent should see the site as he was the customer (so he should even "temporarely" belong to customer's customerGroup, add items to basket and complete order, see orders history, etc...).

My problem is how to tell Kartris that agent is navigating/seeing prices/ordering with customer account (I think I should effectively use customer account having a session variable that flags user as agent)... every suggestion on how to reach that result is welcome.
Tiggywiggler Marked As Answer
 Posted Wed 24 May 2017
Supreme Being

Supreme Being - (105,358 reputation)Supreme Being - (105,358 reputation)Supreme Being - (105,358 reputation)Supreme Being - (105,358 reputation)Supreme Being - (105,358 reputation)Supreme Being - (105,358 reputation)Supreme Being - (105,358 reputation)Supreme Being - (105,358 reputation)Supreme Being - (105,358 reputation)

Group: Forum Members
Last Active: Mon 6 Dec 2021
Posts: 235, Visits: 750
Would you be happy for the agent to be logged in as the customer even without being given the username / password?

You could directly instruct the login system to load the security profile of the customer against the session being used by the agent and then every request that the agent makes to the ASP.Net application will have a authentication cookie that maps to the customer.

Of course, the agent has access to all of the customer's information etc. as if he was the customer, but the credentials are not shared.

You may be able to use FormsAuthentication.SetAuthCookie(strFldEmailAddress, True) where strFldEmailAddress is the customers email address.


We are always willing to help out the community or pitch in to help you fix a problem. However, if you want a complete solution made such as a code module or new feature added you have two options. Either
1) Reach out to the Kartris internal development team at http://www.kartris.com/Contact.aspx.
2) Contact one of the Kartris approved partners at http://www.kartris.com/t-Worldwide-Developers.aspx.

Have fun and good luck coding.

Similar Topics

Expand / Collapse

Reading This Topic

Expand / Collapse

Back To Top