Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9091

Webdynpro logout button - clear session

$
0
0


Hi ,

     I know this has been asked multiple times, i found many thread on it but none solved my problem.

 

I need a logout button which cleans up user's session in my application, so that when the user logs in next time, the user is forced to enter the credentials again(login screen).

 

Current state of applicaiton:

 

  • I have created an exit plug , which is triggered when clicking a href button in my application. This works fine as it comes out of the applicaiton into a blank screen.

 

  • In the applicaiton node(SICF), i have included the java script code.

 

<html><body><script language="javascript"> function DelSso2Cookie(sName,sPath) {var sso2Domain = location.hostname;if (location.hostname.indexOf(".")>

0)sso2Domain =location.hostname.substr(location.hostname.indexOf(".")+ 1);p="";if(sPath)p=" path="+sPath+";";document.cookie = sName+"=0; expires=Fri, 31 Dec 1999 23:59:59GMT;"+p + "domain="+sso2Domain+";";}

</script><span style="font-weight:bold;vertical-align:middle"> <br>

You are logged off successfully

<br></span>

<script language="javascript">

try {document.execCommand( 'ClearAuthenticationCache' );} catch (e) {} DelSso2Cookie("MYSAPSSO2","/");

</script>
<body onload = "DelSso2Cookie("MYSAPSSO2","/")">
</body></html>

 

 

     The application logs in automatically when i relaunch the application (user not prompted with login screen).

 

Thanks & regards,

Tashi


Viewing all articles
Browse latest Browse all 9091

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>