Passing additional HTTP Header (JWT) to Vaadin Application

Hi Community

Currently I’m facing the problem of passing a JWT in a HTTP header field to a Vaadin 8 application. The first request to https://myapplication only returns html and javascript for referencing vaadinBootstrap.js and initializing the vaadin app. So the given Jason Web Token in the first request does not reach the init() method of the application.
The init() method is called after additional request which is made by preloaded javascript. My question is, how to load the vaadin application with additional HTTP header in the first calling request?

I was trying to simulate this in the chrome postman but was not able to get the passed HTTP header field into the init() method of the vaadin application.

Thanks in advance

You probably need to extend VaadinServlet and put code there, not in UI init().

Thanks Denis. Any ideas what’s the best solution for that. I would have to cache the Jason Web Token between the first request and the following request made from Loader Page. I guess the Vaadin Session is created within the first request? So storing the values from JWT inside the Vaadin Session could be a solution?