Avatar

Level 3

Hi Saket,

I've made the change to the security-config.xml file as suggested, and the Flex application loads without needing an external login.  However, I'm still having the problem of the application needing some kind of credentials before it can fully initialise.

Basically, I've made a new creationComplete function in index.mxml to load my LoginView and allow entering of user credentials via the userManager.  Nothing else is loaded, not the AssetManagerView, or anything else that was originally in the init() function.  I use userManager.login(username, password) to send the credentials to the LC server, and once I've received a UserEvent.AUTHENTICATION_SUCCESS, I call the original init() function to start the application in full, with my user logged in.  However, when I call userManager.login(username, password), I get the following error:

TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at com.adobe.icc.services.user.providers::SSOManager/sendRequest()
    at com.adobe.icc.services.user.providers::SSOManager/login()
    at com.adobe.icc.services.user.providers::UserManager/login()
    at au.com.kristian.views::LoginView/loginHandler()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.core::UIComponent/dispatchEvent()
    at au.com.kristian.components::Login/login()
    at au.com.kristian.components::Login/validateLogin()
    at au.com.kristian.components::Login/loginButtonClickHandler()
    at au.com.kristian.components::Login/__loginButton_click()
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.core::UIComponent/dispatchEvent()
    at au.com.kristian.components::Login/keyPressHandler()

Digging into the SSOManager code, I'm suspecting that it's the reference to SSOManager.loginURL that is null, which is causing the issue.  I can't be certain, since I'm unable to set this property to test this theory.

I thought that perhaps loading the FlexConfiguration before logging in would set this property (due to the fact that once the config is loaded, that's when the user object is loaded without inputting any username/password in the default Flex app), but when I try to load the config, it fails with the following trace line:

failed to load flex config: [RPC Fault faultString="Send failed" faultCode="Client.Error.MessageSend" faultDetail="Channel.Security.Error error Error #2048: Security sandbox violation: http://localhost:8080/myapplication/assetmanager/index.swf cannot load data from https://localhost:8080/myapplication/messagebroker/amfsecure. url: 'https://localhost:8080/myapplication/messagebroker/amfsecure'"]

Since the FlexConfig cannot load, the application cannot continue.  I understand the concepts of sandbox violations, but I think this error is not 100% representative of the true problem, since when using the JSP wrapper and the original initialization flow, there is never any sandbox violation.

So it seems there is still a piece of the puzzle missing here...

K.