Vaadin 7. 如何在客户端存储凭据
Vaadin 7. How to store credentials on client side
我需要为我的已验证用户保存 login/password。 LoginForm 组件似乎已被弃用。我还能如何让客户端的浏览器保存输入的登录名和密码? SubmintButton class 能以某种方式帮助我吗?
谢谢。
我建议使用 cookie 并实现记住我的功能。
这或多或少意味着,您创建一个带有用户唯一标识符的 cookie(永远不要!将用户凭据存储在 cookie 中)。这个唯一标识符也存储在您的应用程序中,并且出于安全原因,通常应该有租用时间,在一定时间后到期。每次用户进入您的应用程序时,系统都会检查 cookie 是否仍然存在并且有效,如果存在则直接进入应用程序,如果不存在则进入登录表单。
也许下面的 link 会给你一个想法:
http://fishbowl.pastiche.org/2004/01/19/persistent_login_cookie_best_practice/
我知道的唯一方法是使用 cookie。为此,我使用 Spring 具有 remember me 功能的安全性。
https://docs.spring.io/spring-security/site/docs/current/reference/html/remember-me.html
核心中的 LoginForm 目前确实已弃用,因为它与大多数现代浏览器不兼容。有a patch in review to fix this issue, but in the mean time you can use an excellent add-on from the Directory called LoginForm.
我需要为我的已验证用户保存 login/password。 LoginForm 组件似乎已被弃用。我还能如何让客户端的浏览器保存输入的登录名和密码? SubmintButton class 能以某种方式帮助我吗?
谢谢。
我建议使用 cookie 并实现记住我的功能。 这或多或少意味着,您创建一个带有用户唯一标识符的 cookie(永远不要!将用户凭据存储在 cookie 中)。这个唯一标识符也存储在您的应用程序中,并且出于安全原因,通常应该有租用时间,在一定时间后到期。每次用户进入您的应用程序时,系统都会检查 cookie 是否仍然存在并且有效,如果存在则直接进入应用程序,如果不存在则进入登录表单。
也许下面的 link 会给你一个想法: http://fishbowl.pastiche.org/2004/01/19/persistent_login_cookie_best_practice/
我知道的唯一方法是使用 cookie。为此,我使用 Spring 具有 remember me 功能的安全性。
https://docs.spring.io/spring-security/site/docs/current/reference/html/remember-me.html
核心中的 LoginForm 目前确实已弃用,因为它与大多数现代浏览器不兼容。有a patch in review to fix this issue, but in the mean time you can use an excellent add-on from the Directory called LoginForm.