User-Info to Vaadin Session

Dear All,

how and where do I store user-information (e.g. name, email, id, etc) within a vaadin session to make it accessable from everywhere over VaadinSession.getCurrent()?

I thought of extending the VaadinServlet (MyServlet extends VaadinServlet) with the functionality of set- and getUser(). But i am not able to access this functions.

Thanks in advance

Patrick

Hi Patrick. Have you tried the setAttribute in VaadinSession ?
https://vaadin.com/api/platform/14.0.9/com/vaadin/flow/server/VaadinSession.html#setAttribute-java.lang.Class-T-

Hi Pekka,

Thank you. No i did not try that. Works fine.