Home » Eclipse Projects » Remote Application Platform (RAP) » Logout (RAP 2.1)
| | |
Re: Logout (RAP 2.1) [message #1063811 is a reply to message #1063768] |
Fri, 14 June 2013 11:02 |
|
Hi Oliver,
the problem with form-based authentication is that this method is just
not suitable for Ajax applications because it intercepts XHR reqests and
redirects to some login/logout HTML page. So the XHR request that
expects data in a given format will receive HTML content instead.
To make it worse, the redirect is completely transparent to the XHR API,
so there's no way for the client to react on it.
So there's no obvious fix for bug 390711. I didn't quite understand how
multiple tabs change the thing. Could you post the response JSON that
lead to the "TypeError: a is undefined"?
Regards,
Ralf
--
Ralf Sternberg
Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/
Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
|
|
|
Re: Logout (RAP 2.1) [message #1063824 is a reply to message #1063811] |
Fri, 14 June 2013 11:50 |
Oliver B. Messages: 38 Registered: November 2010 |
Member |
|
|
Hi Ralf,
thanks for the explanation.
I understand now that there is no easy fix for bug 390711.
These were the steps that led to that error:
1. Open multiple tabs for the same application/session
2. In one tab the user presses logout and the http session is invalidated and the user is sent to logout/login page
3. The other tabs will be informed of the logout with the next request (tomcat redirects to login page because of the invalid session cookie)
4. That XHR request fails and the json redirect to the login page is issued (using the sample jsp login page from bug 390711)
5. Before the json redirect is processed the browser exit confirmation triggers
6. If the user denies the browser exit confirmation the javascript error occurs
Everything works fine if the user confirms the exit confirmation
This is the complete error message:
Client Error
Details:
Error: TypeError: a is undefined
Script:
{
"head": {
"redirect": "https://localhost/App/start"
}
}
fileName: https://localhost/App/rwt-resources/rap-client.js
lineNumber: 228
columnNumber: 130
Stack: rwt.remote.MessageProcessor.processMessage@https://localhost/App/rwt-resources/rap-client.js:228
.members._handleSuccess@https://localhost/App/rwt-resources/rap-client.js:232
@https://localhost/App/rwt-resources/rap-client.js:96
rwt.remote.Request.prototype._onReadyStateChange@https://localhost/App/rwt-resources/rap-client.js:96
.statics.bind/d@https://localhost/App/rwt-resources/rap-client.js:14
Debug: off
Request: {"head":{"requestCounter":6},"operations":[["set","w23",{"activeControl":"w49"}],["set","w49",{"selection":["w108"]}],["notify","w49","Selection",{"item":"w108","detail":null,"shiftKey":false,"ctrlKey":false,"altKey":false}],["set","w49",{"focusItem":"w108"}],["notify","w49","MouseDown",{"button":1,"x":512,"y":401,"time":125465,"shiftKey":false,"ctrlKey":false,"altKey":false}],["notify","w49","MouseUp",{"button":1,"x":512,"y":401,"time":125577,"shiftKey":false,"ctrlKey":false,"altKey":false}],["set","w1",{"cursorLocation":[512,401],"focusControl":"w49"}]]}
Thanks,
Oliver
|
|
|
Re: Logout (RAP 2.1) [message #1063903 is a reply to message #1063824] |
Fri, 14 June 2013 21:30 |
|
Thanks for your detailed explanation. Now I got it.
Obviously, the exit confirmation doesn't make sense when the session has
timed out, there is no way to continue anyway. We should probably
disable the exit confirmation just before following the redirect, as the
thing interferes with redirecting. Could you please open a new bug for this?
Unfortunately, it's too late to fix this for 2.1, but the fix could
become part of a service release.
Best regards,
Ralf
--
Ralf Sternberg
Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/
Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
|
|
| |
Goto Forum:
Current Time: Mon Sep 23 07:34:51 GMT 2024
Powered by FUDForum. Page generated in 0.04699 seconds
|