Example of chat application with WebSockets (JSR 356 and HTML5 WebSockets API) running on Undertow with token-based authentication.