Author |
|
iSofia Newbie
Joined: 24 May 2014 Location: Singapore
Online Status: Offline Posts: 35
|
Posted: 10 November 2014 at 10:40pm | IP Logged
|
|
|
In remote login, the AfterLogic LoginToAccount() API function is used, and upon a successful verification of credentials, the SetAccountAsLoggedIn() function is called, followed by a call to CApi::Location('/'), which essentially loads and launches the WebMail app (I think?).
Is there any way to specify a different location in the CApi::Location('/') function call? I am trying to make use of a shared SSL portal.
Where the normal login to WebMail would be
- webmail_installation_domain.com
the secure login, which works, would be
- https://shared_host_server.com/~shared_account_name/webmail_installation_domain.com
Please help. Thank you.
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 11 November 2014 at 2:53am | IP Logged
|
|
|
Yes you can certainly supply a different URL there, something like:
Code:
CApi::Location('http://webmail.domain.com/'); |
|
|
should work as expected.
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|
iSofia Newbie
Joined: 24 May 2014 Location: Singapore
Online Status: Offline Posts: 35
|
Posted: 11 November 2014 at 9:28am | IP Logged
|
|
|
Igor wrote:
Yes you can certainly supply a different URL there, something like:
Code:
CApi::Location('http://webmail.domain.com/'); |
|
|
should work as expected. |
|
|
Unfortunately, although the location setting works, it does not log me in.
With CApi::Location('/'), I'm logged in and it loads the message list page.
But with CApi::Location('http://webmail.domain.com/'), I'm not logged in and only get the standard login page.
Why is that?
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6104
|
Posted: 12 November 2014 at 2:24am | IP Logged
|
|
|
Oops, seems like I missed that aspect somehow. You will only be logged in if the integration code and target URL are within the same domain. SetAccountAsLoggedIn adds a cookie for the current domain which will not be available on a different one.
--
Regards,
Igor, AfterLogic Support
|
Back to Top |
|
|
iSofia Newbie
Joined: 24 May 2014 Location: Singapore
Online Status: Offline Posts: 35
|
Posted: 12 November 2014 at 9:38am | IP Logged
|
|
|
Igor wrote:
Oops, seems like I missed that aspect somehow. You will only be logged in if the integration code and target URL are within the same domain. SetAccountAsLoggedIn adds a cookie for the current domain which will not be available on a different one. |
|
|
Oops is right, but your line about the cookie gave me an idea. By simply calling all the scripts through the shared secured servers, including the remote login script, CURL brokers, and finally WebMail itself, it works!
Thank you for the hint. It turned out to be the solution.
|
Back to Top |
|
|