Vaadin身份验证最佳做法 [英] Vaadin authentication best practice

查看:95
本文介绍了Vaadin身份验证最佳做法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对Vaadin身份验证的最佳做法感兴趣,我认为这里主要有两种选择:

I am interested in the best practice in authentication in Vaadin I think there is mainly two option here:

  • ThreadLocal(可能导致内存不足,对于不同的用户可能具有相同的线程)
  • Spring Security + Vaadin集成(似乎有点过多)

您更喜欢哪一个?为什么? (安全问题,易于开发,其他因素)

Which one do you prefer and why? (Security issues, easy development, other factors)

推荐答案

在Vaadin中,有很多不同的身份验证方法.

There are a lot of different ways for authentication in Vaadin.

  1. Vaadin基本身份验证.
    • 对于Vaadin 6,请尝试 LoginForm .
    • 对于Vaadin 7,您可以使用新的&改进了LoginForm的替换实现,首先是可作为附件使用,然后是内置于Vaadin 7.7中.
    • 对于Vaadin 8,使用相同的重新实现的 LoginForm .
    • 对于 Vaadin Flow (自版本12开始未实现).您可以细读开源代码并进行构建相似的东西.超类内置了对侦听器"的支持,因此您无需从头开始.
  1. Vaadin base authentication.
    • For Vaadin 6, try LoginForm.
    • For Vaadin 7, you can use the new & improved replacement implementation of LoginForm first available as a Add-On, then later built into Vaadin 7.7.
    • For Vaadin 8, use that same re-implemented LoginForm.
    • For Vaadin Flow, not implemented as of version 12. You could peruse the open source code, and build something similar. The "Listener" support is built into the superclasses, so you are not starting from scratch.

如果要简化操作,我建议选择1或2,如果需要电源安全系统,则选择4.

I recommend you to select 1 or 2 if you want make it easy or 4 if you want power security system.

这篇关于Vaadin身份验证最佳做法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆