Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to return from navigateToURL() call?

Guest
Feb 22, 2013 Feb 22, 2013

I'm relatively new to Flex 4 and AS3, so if this question seems stupid, that's not intentional; it's a function of my learning...

The Question: How can one navigate from a Flex 4 / AS3 application to a URL not directly related to it, and then return to the Flex 4 / AS3 application in the same state it was when it was "navigated away from"?

I'm working on an application to which users are authenticated via a web single signon ("WSSO") application external to mine. Access to my application's initial page is granted by successful authentication in the WSSO tool. This authentication is effected through a web page hosted on the servers managing access to resources.

The WSSO application allows access for some period of time before the authentication it granted times out, and requires re-authentication before access to any protected resources is again allowed.

A timeout is detected whenever a call to one of the HTTPServices protected by WSSO returns a FaultEvent containing the HTML of the WSSO login page as its message. I can navigate to the URL corresponding to that HTML, requiring the user to re-authenticate, but how do I get "back" to the Flex application?

TOPICS
ActionScript
542
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 22, 2013 Feb 22, 2013

you can use the localconnection class to communicate between two windows open at the same time on the same computer.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Feb 22, 2013 Feb 22, 2013

kglad, appreciate your response. I don't have any control over the WSSO page. The results of successful re-authentication are simply that HTTPService requests to protected resources complete normally, rather than being returned as FaultEvents. Conceptually, I'd like to direct the user to the WSSO authentication page when a timeout is detected, and, once they've been (re-)authenticated, return back to the Flex application in the state it was in at the time the authentication interruption was detected. From what I read about the LocalConnection class, that doesn't seem to address this...

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 22, 2013 Feb 22, 2013
LATEST

you can't use localconnection.

and, i don't think you're going to be able to use navigateToURL the way you currently are. 

you'll need to use javascript to open the authentication page and use javascript/cookies to communicate between the two open windows.

you can use the externalinterface class to most reliably communicate between flash and javascript.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines