Passing parameters through URL using vaadin

Hello friends… I am new to vaadin framework and i want to know how we can pass the username of logged in user from
one application to another
using URL pattern. I want to use this for my [b]
[b]

[/b]login demo application
[/b]. Or can you please give me some examples of
setUser()
and
getUser()
methods? Please let me know… Thank you.

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
          getApplication().setUser(user);
     } else {
          getApplication().setUser(null);
          showNotification("Not logged in");
     }
}

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

Thank you for replying me but i have done with login form and let me know is it possible to pass these parameter (only username in this case) to another application? because in some cases we want that username by using which we have logged in. It seems very basic question but i have just started with Vaadin and i want to learn it… and also i am unable to add minimize button on window. I have read the other post to do the same but i couldnt understand that and my eclipse setup is unable to compile the ToobarWindow addon. So please help me out of this… Thank you in advance. :smiley: