Search The ForumSearch   RegisterRegister  LoginLogin

AfterLogic WebMail Lite 7

 AfterLogic Forum : AfterLogic WebMail Lite 7
Subject Topic: AfterLogic API: Login location Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
iSofia
Newbie
Newbie
Avatar

Joined: 24 May 2014
Location: Singapore
Online Status: Offline
Posts: 35
Posted: 10 November 2014 at 10:40pm | IP Logged Quote iSofia

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 View iSofia's Profile Search for other posts by iSofia
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 11 November 2014 at 2:53am | IP Logged Quote Igor

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 View Igor's Profile Search for other posts by Igor
 
iSofia
Newbie
Newbie
Avatar

Joined: 24 May 2014
Location: Singapore
Online Status: Offline
Posts: 35
Posted: 11 November 2014 at 9:28am | IP Logged Quote iSofia

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 View iSofia's Profile Search for other posts by iSofia
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6104
Posted: 12 November 2014 at 2:24am | IP Logged Quote Igor

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 View Igor's Profile Search for other posts by Igor
 
iSofia
Newbie
Newbie
Avatar

Joined: 24 May 2014
Location: Singapore
Online Status: Offline
Posts: 35
Posted: 12 November 2014 at 9:38am | IP Logged Quote iSofia

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 View iSofia's Profile Search for other posts by iSofia
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide