Important Notice - Forums is archived

To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Product icon

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.

Passing parameters through URL using vaadin

Kshitij Arade
1 decade ago Apr 16, 2012 2:23pm
Johannes Häyry
1 decade ago Apr 18, 2012 12:18pm

If you want to do the authentication in your Vaadin application then you wouldn't really pass anything from application to another. Each of the applications could run in different sessions and you want to authenticate the user session. There is a LoginForm component that has a LoginListener or you could construct the layout with your own components, but anyhow you do it, you in a very basic case do something like in the following pseudo code:

onLogin(username, password) {
     User user = backend.getUser(username, securehash(password));
     if (user != null) {
          // Logged in
     } else {
          showNotification("Not logged in");

Of course there are heavier ways to do it also Spring Security etc.

Kshitij Arade
1 decade ago Apr 19, 2012 1:50pm