Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

login and logout

Avatar

Not applicable

Hi,

I have an application that uses lccs. All users are authenticated as guests. My problem is that I can't logout a user in order to login another user. For both users I use different authenticators (new AdobeHSAuthenticator objects with different names and no passwords). When I call connectSessionContainer.logout (also tried with close() ) everything seems to be fine. ConnectSessionContainer.isSynchronized is equal false, so I guess this means the user is logged out. However when I try to login the second user using the same connectSessionContainer I can see that after connectSessionContainer.isSynchronized is equal true the user descriptor contains the same display name even though there is a new authenticator with a new name. So when I want to send a message to SimpleChatModel, the MessageDescriptor uses displayName of the previous user. I don't understand why whould userManager.myUserDescriptor keep the same display name after relogging. I guess there's something fundamentally wrong with my understanding of how lccs works. How can I logout and login again so that userManager.myUserDescriptor would be changed ?

Many thanks,
Piotr

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi Piotr (and sorry for the long-ish wait),


I think what's happening in this case is that the AdobeHSAuthenticator's authenticationKey is remembering the last session token you used. Try something like :

cSession.authenticator.authenticationKey = null;

cSession.authenticator.userName = "whatever";

cSession.login();

nigel

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Hi Piotr (and sorry for the long-ish wait),


I think what's happening in this case is that the AdobeHSAuthenticator's authenticationKey is remembering the last session token you used. Try something like :

cSession.authenticator.authenticationKey = null;

cSession.authenticator.userName = "whatever";

cSession.login();

nigel

Avatar

Not applicable

It worked out, thanks!!!

In my case I had to keep existing authenticator and set authenticationKey to null as you suggested. Creating a new authenticator wouldn't make it work.