Expand my Community achievements bar.

Cannot re-authenticate in the same session.

Avatar

Former Community Member

I get this error when I call the Java server code sample that was included in the AFCS download.  I am calling the getAuthToken function on the AccountManager object.  This error only occurs when I open another tab in my browser and try to get another token.  We have wrapped the Java sample in a LiveCycle process and the channel is setup as follows:

var ro:RemoteObject = new RemoteObject( "myDestination" );

var cs:ChannelSet = new ChannelSet();

cs.addChannel(new AMFChannel("remoting-amf", "http:myServer:8080/remoting/messagebroker/amf"));

ro.setCredentials( "Administrator", "password" );

If I remove the setCredentials when I do not already have the browser open the I get a different error.  If I remove the setCredentials when I try to open another tab I do NOT get the error mentioned above.

So what is it about the setCredentials that is making this work only the first time and not when I try to open another tab in my browser?

Thanks in advance for any help.

-chris   

3 Replies

Avatar

Employee

Sorry but I don't see the error in your message

Can you please set the debug flag in  AFCS.java (Utils.DEBUG) and send the traces you get ? (possibly both when you get an error and when you don't)

I would assume setCredentials either sets a Cookie, or an HTTP header, or it passes a parameter that conflict with the sample code parameters (like "user" for the username)

Avatar

Former Community Member

Hey Raff,

The error returned from the remoting call is "Cannot re-authenticate in the same session."  I don't have access to the LC box to add the debug point.

Has anyone tested calling the getAuthToken method to create an SSO?  This seems like it would be the way to create an SSO application. 

-chris

Avatar

Employee

Looks like this is a fairly common problem when using Flex remoting and LiveCycle. I found one explanation here:http://michael.omnicypher.com/2009/01/authentication-with-flex-remoting-in.html but you can look for more.

I am not familiar with remoting used this way so I can't really help with that.

Regarding SSO, I would say yes and no. The purpose of external authentication is to leverage your authentication system and user database and give you a way to manage what privileges / permission your users will have once they enter a room.

So, in that sense yes, external authentication is a mechanism to do single-sign-on between your main web application and an LCCS room.