cancel
Showing results for 
Search instead for 
Did you mean: 

How to kill client session forciblly

Amey-Mogare
Contributor
0 Kudos

Hi,

I have one application where I want to kill user session immediately as he clicks on Log Off button.

What code should I write inside this event handler?

I'm currently clearing client session scope with scope.clear().

But it is not killing client session.

Pls help me on this.

I heard of some methods registeredToBeDestroyedListerner() or something?

Regards,

Amey

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Normally your Web Dynpro applications run in the portal. When you log off the portal, your session is destroyed. From your question I suspect you run the WDP application outside the portal.

Maybe it helps if you set authentication (application property sap.authentication) to true.

Good luck, Roelof

Amey-Mogare
Contributor
0 Kudos

ok,

but can u tell me how can i kill client session in my current scenario?

I hav to write some piece of code inside event handler of 'Log Off' button..

Currently, i'm going back to login page on click of Log Off button..But client session is getting killed after specified timeout only..

pls help me on this..

regards,

Amey

Former Member
0 Kudos

Hi,

You can try the following code

WDClientUser.forceLogOffClientUser();

Regards,

Ayyapparaj

Amey-Mogare
Contributor
0 Kudos

I used this in my application. It is working correctly.

I passed URL of my login page as argument in

WDClientUser.forceLogOffClientUser(URL);

It is redirecting page to login view.

How can i check that client session is killed or not?

Regards,

Amey

Answers (0)