Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create User authentication on Vaadin?

I created a simple login view on Vaadin (using Eclipse IDE) and I created a database on Phpmyadmin. Now how to proceed to verify the username and the password ? Does anyone have some source code examples please ? Thank you so much !

like image 549
Lamya Ab' Avatar asked Mar 05 '15 11:03

Lamya Ab'


People also ask

Is vaadin secure?

Vaadin Flow is a server-side framework, where all the application state, business model, and UI logic stay on the server. A Flow application never exposes its internals to the browser, where vulnerabilities could be abused by an attacker. This makes the development model inherently secure.


2 Answers

Here is a handy demo application to get you started...

Demo: http://demo.vaadin.com/archetype-application/

Source code : https://github.com/vaadin/archetype-application-example

Accompaning Blog :https://vaadin.com/blog/-/blogs/vaadin-7-3-7-and-new-maven-archetypes

This has a basic login function but you could expand on this.

Here is another similar demo...

Demo : http://dashboard.demo.vaadin.com/#!dashboard

Source code : https://github.com/vaadin/dashboard-demo

like image 198
Kevvvvyp Avatar answered Oct 11 '22 21:10

Kevvvvyp


There are several ways in doing this.

You can use a solution like apache shiro which then can authenticate/authorise against different backends. It has the big advantage that you can (at a later date) switch to another database, a LDAP or ADS backend.

The "simpler" way would be to have a login form, and then validate the username and password via a jdbc query.

The login form addon also has some code ideas for you.

like image 23
André Schild Avatar answered Oct 11 '22 21:10

André Schild