Я использую Jwt в сеансе vaadin, и при нажатии F5 у меня возникает проблема Страница ошибки
private void onLogin(LoginForm.LoginEvent loginEvent) {
String enteredUsername = loginEvent.getLoginParameter("username");
String enteredPassword = loginEvent.getLoginParameter("password");
AuthenticationResponse response = apiExecutorService.doAdminAuthentication(enteredUsername, enteredPassword);
if (response != null && StringUtils.isNotBlank(response.getAccessToken())) {
// Put token into session params
String test = response.getAccessToken();
VaadinSession.getCurrent().setAttribute("access_token", response.getAccessToken());
VaadinSession.getCurrent().setAttribute("refresh_token", response.getRefreshToken());
Notification...
// Wait and redirect to admin page
Page current = Page.getCurrent();
notification.addDetachListener(event -> current.setLocation("/admin"));