I have implemented a small HTTP server in my Java program based on com.sun.net.httpserver.HttpServer, which also uses basic authentication. This all works fine, however, I want to handle any failed authentication requests.
By default, when a user fails to authenticate (when she hits the Cancel button on the browser's login popup), a blank page is sent back to the client; the handle() method of the HttpHandler is not invoked.
Any ideas how I could catch these failed authentication attempts in my program?
Thanks!