如何编程“登录”基于用户使用J2EE容器认证时,“记住我”饼干吗? [英] How to programatically 'login' a user based on 'remember me' cookie when using j2ee container authentication?
本文介绍了如何编程“登录”基于用户使用J2EE容器认证时,“记住我”饼干吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用我的WAR基于表单的authntication。
我想实现一个记住我的cookie
所以:
1)我怎么可以拦截认证用户被重定向到表单之前?
2)说我检查的Cookie,并以其优良的,我如何进行实际的登录用户?
i'm using form based authntication in my WAR. i want to implement a 'remember me' cookie so: 1) how can i intercept the authentication before user is redirected to the form? 2) say i checked the cookie and its fine, how do i actually login the user?
推荐答案
要做到这一点,最好的办法是使用的 过滤器
,以检查该Cookie是存在的,记录与登录系统的用户。
The best way to do this is to use a Filter
which will check that the cookie is there and log the user with your login system.
这篇关于如何编程“登录”基于用户使用J2EE容器认证时,“记住我”饼干吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文