w20-framework / w20

W20 is a Web framework, built upon a powerful RequireJS/AngularJS/Bootstrap mix to help you develop single page applications.
https://w20-framework.github.io/
Mozilla Public License 2.0
8 stars 9 forks source link

Implement best-effort basic authentication logout #70

Closed adrienlauer closed 8 years ago

adrienlauer commented 8 years ago

Users seem to have a hard-time login out of applications using basic authentication. This is not surprising as basic auth don't provision for a logout mechanism.

Some hacks are possible though and we should be able to do a best-effort logout in our BasicAuthentication security provider.

We could make this work easily in IE/Edge:

document.execCommand('ClearAuthenticationCache', 'false');

In Firefox we can use synchronous AJAX to send false credentials. In Chrome, I don't think we can do anything.

At last, if a logout trick is not possible in the current browser, we should display a message to the user to close its browser for full logout (modal or something).