on 11-14-2012 4:54 PM
Hello,
I have been struggling to figure this one out for a while now. I have created a BSP application following the guide of John Moy here: http://scn.sap.com/community/mobile/blog/2010/11/20/build-your-first-mobile-web-app-using-jquery-mob....
Now my question is how can I add a logoff button to ensure the users have to log in if they revisit this page? I have been searching and trying everything I can find with no luck.
If anyone has any suggestions I would be very grateful!
Thanks.
Hey Dan, did you get it to work?
I'm doing about the as you, but have 3 linked BSPs apps (one is the 'portal' to the others) and need a logoff to close the browser sessions and return to the logon page of the first BSP.
Currently I created another BSP (copy of system_private) and that seems to work as I expect. Haven't added Jquerymobile yet. That might be the showstopper.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
javascript:location.href='?sap-sessioncmd=logoff';
OR
http://help.sap.com/saphelp_470/helpdata/en/6b/9d91d062cc52419f23926ff1bf2ad3/content.htm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
True, unfortunately the link and documentation is a bit old (Netweaver 2004) and the "SYSTEM" BSP you are supposed to copy has more dependent views than the document mentions. It's also not clear how it works and it's a bit ugly (frames and spaghetti code).
My first suggestions "works" in that it definitely ends the session but it does redirect to a 404 (page not found /mypath(====)/bsp/system/sessionexit.htm) so you wouldn't just do location.href or your user will get an error page. In our system we have a logoff.htm page which contains a hidden image which logs you off:
You are now logged off!
Click <a href="default.htm">here </a> login again or <a href="javscript:window.close()">exit</a>.
<img src="?sap-sessioncmd=logoff" width="1" height="1">
Works fine for us.
Ideally we would like a way to do this in ABAP, surely even the SYSTEM BSP runs ABAP code to kill the session. Does anyone know?
We drift from initial discussion but ...
I guess (or as I am understanding it) the main problem why we shall go over HTML side is that you want to remove authorization cookie from browser so other user could not just open another tab and get logged into aplication again authomatically by browser who sends your cookie with every server request. So you had to make a call to server which in return will send you response with invalid cookie or clear yor browser's cookie.
Basically you shall support following situations when doing HTTP apps with SAP:
SAP solution with system and system_public (covers that all situations, althought code is ugly and frames are not modern anymore)
Best regards, Artem
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.