Would it be possible to extend this protocol:
with logout (connection closed, timeout, etc) events?
Something like this:
GET /close HTTP/1.0
The main benefit would be that the authenticator application could build
a session table from live sessions, which is currently very hard to do.
This means after an authentication OK response is sent, nginx should
send a close event, no matter how the connection was lost (setting the