While developing an application it's quite useful to be able to quickly login as different users, with different roles, to see how the application presents itself.
Typing usernames and entering password is no fun, and a waste of time. What I'd like to do is:
- add a page/panel with a list of available usernames;
- clicking on a username will generate an event for Spring security which allows it to recognize the user as authenticated, without entering passwords;
- after clicking the link I am authenticated as the specified user.
N.B.: Passwords are hashed and submitted in plain-text using forms, so encoding the passwords in the links is not an option.
Obviously this feature will only be present at development time.
How can I achieve this?