innovasem Posted June 20, 2013 Share Posted June 20, 2013 Hello. I have a website in. NET where my users are logged and want you to do automatically login Prestashop backoffice that I have on another server. I use Prestashop 1.5.3.1 version. What I can do? I can call some url passing the email and password? I can create the authentication cookie? Thanks. Link to comment Share on other sites More sharing options...
vekia Posted June 20, 2013 Share Posted June 20, 2013 Are you familiar with programming ? Im asking because unfortunately it isn't as simple as it seems. Everything depends on your website (NET). Link to comment Share on other sites More sharing options...
innovasem Posted June 20, 2013 Author Share Posted June 20, 2013 Hello, Vekia. Thanks for answering. I'm pretty familiar with programming .NET but not in PHP. If you can help, I appreciate it. Link to comment Share on other sites More sharing options...
vekia Posted June 20, 2013 Share Posted June 20, 2013 <p>the only way to achieve this is:</p> <p> </p> <ol> <li>accounts in your website must be related to the accounts in your store</li> <li>when someone log in in your website send POST form request to your store with login credentials</li> </ol> Link to comment Share on other sites More sharing options...
innovasem Posted June 20, 2013 Author Share Posted June 20, 2013 (edited) When I want to log in to the backoffice, I go to http://xxxxxx.yyyyyy.net/admin1234/ and the url changes to http://xxxxxx.yyyyyy.net/admin1234/index.php?controller=AdminLogin&token=61852452524779537c73ccc3b840cc03&redirect=AdminHome The parameter controller is where to call to make the post the parameter token, a token is generated not like or what it does The parameter redirect is where you just redirect I checked the file AdminLoginController.php is in the controllers folder. When you post, calls the postprocess(). Since this function calls processLogin(). This function takes the parameters email and passwd and makes the login. From .NET, sending a POST request to http://www.xxxxxx.yyyyyy.net/AdminLogin/[email protected]&passwd=asdfasdf and/or http://www.xxxxxx.yyyyyy.net/controllers/AdminLogin/[email protected]&passwd=asdfasdf and in both cases, it returns me Error 404 Edited June 20, 2013 by innovasem (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts