I'm not sure if I am thinking about this correctly or approaching it the correct way but here is what I am trying to accomplish:
I am using AMFPHP, Flex and puremvc of course
I am implementing user authentication and want to emulate user sessions in flex
When a user logs in to the Flex application I set a session var for the user in AMFPHP. Then if the user reloads the page with the flex application I want to detect that the user is already authenticated and instead of taking them to the loginView stack I want them to go directly to the applicationView stack.
I have logging in and out functional.
I also have a button on my loginView that triggers the loginMediator to checkSession. Upon success the view stack is changed to the application, upon failue the view stack is changed to the login. This button works.
I have a sendNotification in my StartupCommand. This is suppose to send a notification to the loginMediator to checkSession which handles sending the notification to update the viewstack. But this notification never is received and I have put everything to handle the notification in loginMediator.
How can I make sure that checkSession is automatically called right after the application loads?
Any help is appreciated. TIA,
Shinan