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.

logout from adobe collaboration service

Avatar

Level 2

I am  creating authenticationKey on PHP (server side) after then loging  on flex ( client side) whit help of session.login();  and It is working  fine. But when I am using session.logout(); for logout then it is not  working.....When I am login as new user it is showing old user already  loging... ... please tell me for logout from adobe collaboration service if i am doing anything wrong here...

my logout code is...

session.logout();   
session.close();

Is there any way in server side (PHP) for logout.

Please reply soon ...


Thanks

Rajsun2

15 Replies

Avatar

Former Community Member

Hi Rajsun2,

Could you please more clearly express your issue? Break it down into steps

please :

A) You log in with authKey

B) you log out using the specified code.

C) you log in as a new user - from the same client? New client? New auth

token or old auth token?

D) You see the old user - again, is this the same client? Are you saying you

see 2 users in the room, or just 1?

Lots of confusing info to sort through.

nigel

Avatar

Former Community Member

Hi,

As Nigel mentioned, you should provide a better breakdown for specific investigation.

However, I am giving you an app I ran , wherein you can logout and login multiple times by entering different names and I could see only one user. I ran it with windows in IE8. Run this and figure out if you can run this successfully and also , whats the problem in your original app with respect to this.

And I was running your example when you mailed multiple times. We don't appreciate multiple posting under different topicnames for the same question. Be rest assured, if you have posted once, we will try to get back at the earliest possible time for us.

Thanks

Hironmay Basu

Avatar

Level 2

hi,

Thanks for your kind reply.

the code which I am using to create an AuthKey on server side.

public function getUser(LoginVO $loginVO)

{

$adminVO = new LoginVO();

$adminVO->username = $loginVO->username;

$adminVO->password = $loginVO->password;

$adminVO->roomName = $loginVO->roomName;

$pass= $loginVO->password;

$acname=$loginVO->username;

$collection = db_fetch_single_assoc_row("select * from user where

acname='$acname' and pas=password('$pass')");

if($collection!=''){

$role=50;

$id=$collection['id'];

$adminVO->id=$id;

}else{

if($loginVO->password==''){

$role=10;

$id=rand();

}else{

throw new Exception("Invalid username or password, please

try it again.");

}

}

$username = $loginVO->username;

$room = $loginVO->roomName;

$adminVO->role = $role;

$devUsername = "username";

$devPassword = "password";

$token = "4d8d3e8b5bc449f1bbbb4a2be791b867";

$accountURL = "account_url";

$roomURL = "{$accountURL}/{$room}";

$lccs = new RTCAccount($accountURL);

$lccs->login($devUsername, $devPassword);

$session =$lccs->getSession($room);

$_SESSION['rtcsession'] = serialize($session);

$_SESSION['rtclccs'] = serialize($lccs);

$keytoken=$session->getAuthenticationToken($token,$username ,$id

,$role);

$adminVO->keytoken =$keytoken;

return $adminVO;

}

(A) Yes, I use authkey to login.I am creating the authkey on server side and

login the client side with the help of that key using session.login(). But,

this is working fine for me i.e. I am successfully able to login.

authToken = model.login.loginVO.keytoken;

session.roomURL = 'http://any_room.com';

auth.authenticationKey = authToken;

session.login();

(B) Yes, I use the session.logout() function to logout.

(C) No, I had chosen different client for login. for example: I used a

normal user first to login and then I logout and used another client say

guest to login again.

(D) yeah, I can see the old user only even if I am login many times using

different users. for example: first time I logged in as an user: user01 and

password: password01. Then, I logout and try to login using username:

guest01 and password: null. Then, it is showing the same previous user i.e.

user01. And, if I login again using username: guest02, then again showing me

the same first user i.e. user01. And, no other users are shown me to logged

in like guest01 or guest02.

Avatar

Former Community Member

Did you ran the app I sent ? What is the result for that ?

Thanks

Hironmay Basu

Avatar

Level 2

Hi

I am using flex3 ...the sample code sent by you reflects that it works for

flex4. That is the reason. I am not able to run it.

Avatar

Former Community Member

Hi Rajsun,

I'm still trying to figure out what you mean for C). Are you in the same

browser window, or are you opening a new window? In the real world, the same

browser likely wouldn't be used for multiple users to the same room. Try it

with a new window, perhaps?

nigel

Avatar

Level 2

I am loging in same event same browser first time as publisher and second

time as guest.

Avatar

Employee

maybe I know what's going on.

How do you set the guest credentials ? If you just set auth.userName = "guestName" the problem is that you have left the authentication key set.

The way the system currently works, the authenticationKey in the authenticator has precendence on the other parameters (because the other forms of authentication basically generate an authenticationKey and set the same property, and we want to be able to do login/logout/login without passing new credentials).

Maybe those properties should be managed by setters and getters so that setting userName resets the authenticationKey and viceversa, but right now they are just public properties.

Try setting auth.authenticationKey = null when you change credentials and let us know if that fixes your problem.

Avatar

Level 2

I am setting role on server side code.

I am explaining here my code flow step by step.

1.     I am taking username, password and event name from client side (flex) and send it to server side (PHP).

2.     I am creating AuthenticationToken on server side with help of this code.

if($password!=''){

                                       $role=50;

                           $id=any int id;

                           $adminVO->id=$id;

               }else{

                           if($loginVO->password==''){

                                       $role=10;

                           $id=any int id;              

                           }else{

                                       throw new Exception("Invalid username or password, please try it again.");         

                           }

                          

               }

Here i am setting role if password =null then role =10 and if password !=null then role =50

3.     After then I am creating object of RTCAccount with help of this code.  

                            $lccs = new RTCAccount($accountURL);

4.     After then I am login with developer username and developer password.          

         $lccs->login($devUsername, $devPassword);  

5.     After then i am getting session with help of this code.               

                                        $session =$lccs->getSession($room);  

6.     After then i am creating AuthenticationToken with help of this code.                                      $session->getAuthenticationToken($token,$username ,$id ,$role);

7.     After then i am sending this AuthenticationToken on client (flex) side.

                     8. Afte then i am login with this AuthenticationToken with help of this code.                                               

private function loging():void

            {

                 

                session.roomURL = roomURL;

                auth.authenticationKey = authToken;

                session.login();

               

             }

         

              And logout with this code…

private function logout():void

            {

                 

                auth.authenticationKey = null;

                session.logout();

               

             }

     

please see and give me solution of my problem

Thanks

Rajsun2

Avatar

Former Community Member

Hi Raj,

Could you send us the debug output from your console window in FlashBuilder

when you are connecting, then logging out, then connecting again?

I just tried a test to verify that I could log in with an authKey, log out,

then change the authKey and log in again. Everything appears to work ok.

thanks

nigel

Avatar

Level 2

collaboration.adobelivecycle.com : server does not support RFC 5746, see CVE-2009-3555

thie is error ...

thanks

Rajsun

Avatar

Employee

I am not sure of where you get this error. In the PHP logs ? In the application logs ?

It doesn't look like any error that we generate (and a search on Google returns pages referring to Firefox errors related to SSL/TLS).

Again, I am not sure where you get this error, since you claim you can login once you must have accessed the server successfully.

What we need is the messages in the FlexBuilder console that you get when you run your application in debugging mode.

Avatar

Level 2

When I am runing in debug mode then I am geting this line in FlexBuilder console......    [SWF] /weborb/event-debug/event.swf - 1,936,435 bytes after decompression

TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at event/onCreationComplete()[C:\xampp\htdocs\event\src\event.mxml:57]
    at event/___event_Application1_creationComplete()[C:\xampp\htdocs\event\src\event.mxml:10]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.core::UIComponent/dispatchEvent()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:9051]
    at mx.core::UIComponent/set initialized()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:1167]
    at mx.managers::LayoutManager/doPhasedInstantiation()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\managers\LayoutManager.as:698]
    at Function/http://adobe.com/AS3/2006/builtin::apply()
    at mx.core::UIComponent/callLaterDispatcher2()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8460]
    at mx.core::UIComponent/callLaterDispatcher()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8403]

please tell me what is the problem .....

thanks

Rajsun

Avatar

Level 2

Hi

Please reply anyone... I am waiting for long time

Avatar

Former Community Member

Hi,

As we always mention, you need to produce a small test example along with what you are doing for us to investigate any client side error.

From just error logs, its impossible to figure out whether it’s a flex error,your app error or our client error as the log you sent didn’t have error in our component.

So, you need to send us more details along with example. Only then, we would be in any position to help you

Thanks

Hironmay Basu