I have a java web application running on WebSphere 7. The application uses the form authentication method, and part of the application accesses some protected resources using ajax requests. However, when the user session expires, I get a login page instead of the content that needs to be updated using an ajax request.
Is there a good way to handle this problem? WebSphere returns a 200 response status using the login page, so I cannot rely on this.
There may be a way to tell the server that basic authentication should be used in certain circumstances, but I don't know how to do it.
I also thought about checking first if the session is new, first making a request for insecure resources and then returning a certain status, but it looks like a solution for patented code ...
source
share