[翻译]  How to create User authentication on Vaadin?

[CHINESE]  如何在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 !

我在Vaadin上创建了一个简单的登录视图(使用Eclipse IDE),我在Phpmyadmin上创建了一个数据库。现在如何继续验证用户名和密码?有没有人有一些源代码示例?非常感谢 !

2 个解决方案

#1


7  

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

这是一个方便的演示应用程序,可以帮助您入门...

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

演示:http://demo.vaadin.com/archetype-application/

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

源代码:https://github.com/vaadin/archetype-application-example

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

伴随博客: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

演示:http://dashboard.demo.vaadin.com/#!dashboard

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

源代码:https://github.com/vaadin/dashboard-demo

#2


2  

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.

您可以使用像apache shiro这样的解决方案,然后可以对不同的后端进行身份验证/授权。它具有很大的优势,您可以(以后)切换到另一个数据库,LDAP或ADS后端。

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

“更简单”的方法是拥有一个登录表单,然后通过jdbc查询验证用户名和密码。

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

登录表单插件也有一些代码的想法。


注意!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系我们删除。



 
© 2014-2018 ITdaan.com 粤ICP备14056181号