Apologies if I sound bad.
I have a xyz.war
that does some authentication and sets a cookie(with HttpOnly
set so I can not expire it via javascript) so that when the user logs-in for the next time the session is maintained. Now, given that I have the access to the Tomcat that is hosting the xyz.war
how can I write a Java program that could expire/delete
the cookie? I can create a .war
of the java project and host it in the same Tomcat and access it from client side via a api.
You would have invalidate the session in xyz application. Removing (thus beeing able to midify) cookie by third parties would be a security hole.