Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Getting [Event type="authenticationFailure" bubbles=false cancelable=false eventPhase=2] while tryin

Avatar

Level 1

Hi ,

i am creating an sample app using LCCS. The flow is stated below.

on page opens displaying title window and and asking to enter username, password and Account name. i am creating URL on the fly.

when page loads and if we provide the correct username/password/account name its works fine. The scenario it is failing is for the first if we provide the wrong username validations worksfine and it displays wrong username and with the same session if we are providing correct credentials it is giving me the following error

[Event type="authenticationFailure" bubbles=false cancelable=false eventPhase=2]

private

function application1_creationCompleteHandler(event:FlexEvent):void

{

for (var i:int=0; i <bankData.length ;i++){

MonthsArrayCollection.addItemAt(bankData[i].Months,i)

}

updatedBankData.source = bankData.source;

setdata();

openPopUpWindow();

}

private function openPopUpWindow():void {

systemManager.addEventListener(PopUpLoginEvent.Login_Event, loginDetails,

false);

popup = PopUpManager.createPopUp(

this,MyPopUpWindow,true) as MyPopUpWindow;

PopUpManager.centerPopUp(popup);

}

private function loginDetails(evt:PopUpLoginEvent):void{

userName = evt.userName;

password = evt.password;

accountName = evt.accountName;

roomUrl =

"https://collaboration.adobelivecycle.com/" + accountName +"/test";

authenticateHandler();

//Alert.show(evt.accountName +":"+ evt.userName +":"+ evt.password);

}

private function authenticateHandler():void{

//Alert.show("inside="+accountName +":"+ userName +":"+ password+":"+roomUrl);

//cSession = new ConnectSessionContainer();

cSession.roomURL = roomUrl;

cSession.autoLogin =

false;

cSession.addEventListener(SessionEvent.SYNCHRONIZATION_CHANGE,onSync);

cSession.addEventListener(SessionEvent.ERROR,onSessionError);

auth =

new AdobeHSAuthenticator();

auth.userName = userName;

auth.password = password;

auth.addEventListener(AuthenticationEvent.AUTHENTICATION_SUCCESS,onAuthenticationSuccess);

auth.addEventListener(AuthenticationEvent.AUTHENTICATION_FAILURE,onAuthenticationFailure);

cSession.authenticator = auth;

this.addChild(cSession);

cSession.login();

}

protected

function application1_initializeHandler(event:FlexEvent):

void

{

cSession =

new ConnectSessionContainer();

}

/* */

protected function onAuthenticationSuccess(evt:Event):void

{

trace('AuthenticationFailure Sucess');

initBindSetter();

webPulisher =

new WebcamPublisher();

webPulisher.connectSession = cSession;

this.WebCameraContainer.addChild(webPulisher);

simpleChat =

new SimpleChat();

simpleChat.connectSession = cSession;

simpleChat.height = 235;

simpleChat.percentWidth = 100;

simpleChat.styleName =

"ChatFont";

this.SimpleChatContainer.addChild(simpleChat);

webCameraSubscriber =

new WebcamSubscriber();

webCameraSubscriber.connectSession = cSession;

webCameraSubscriber.height = 176;

webCameraSubscriber.percentWidth = 100;

webCameraSubscriber.displayUserBars=

true;

webCameraSubscriber.addEventListener(UserEvent.USER_BOOTED,onBooted);

webCameraSubscriber.addEventListener(UserEvent.STREAM_CHANGE,onCameraPause);

webCameraSubscriber.webcamPublisher =

this.webPulisher;

this.WebCameraContainer.addChild(webCameraSubscriber);

_camera = Camera.getCamera();

if(_camera == null){

NoCameraImg.includeInLayout =

true;

NoCameraImg.visible =

true;

webCameraSubscriber.includeInLayout =

false;

webCameraSubscriber.visible =

false;

}

else{

NoCameraImg.includeInLayout =

false;

NoCameraImg.visible =

false;

webCameraSubscriber.includeInLayout =

true;

webCameraSubscriber.visible =

true;

}

collabView.visible =

true;

PopUpManager.removePopUp(popup);

}

protected function onAuthenticationFailure(evt:Event):void

{

//Alert.show("ww="+cSession.);

Alert.show(

'AuthenticationFailure Occured'+evt.toString());

/* cSession.logout();

this.removeChild(cSession); */

//auth.logout();

}

protected function onSessionError(event:SessionEvent):void

{

if( event.error )

{

switch (event.error.name)

{

case "INVALID_INSTANCE":

Alert.show(

"Room: "+ roomUrl +", has not been created. \nPlease login to the room console and create a room named "+roomUrl+".", "Room Not Created" );

break;

}

}

}

0 Replies