Jsf 2 记得我在接缝3吗
如何使用seam security 3的记忆我功能 我试着缝两种方式,但它不工作。。。 这里是我的components.xml。。。不确定此文件是否用于seam 3Jsf 2 记得我在接缝3吗,jsf-2,seam3,Jsf 2,Seam3,如何使用seam security 3的记忆我功能 我试着缝两种方式,但它不工作。。。 这里是我的components.xml。。。不确定此文件是否用于seam 3 <security:jpa-token-store token-class="org.jboss.seam.example.seamspace.AuthenticationToken" /> <security:remember-me mode="autoLogin"/> <event type
<security:jpa-token-store token-class="org.jboss.seam.example.seamspace.AuthenticationToken" />
<security:remember-me mode="autoLogin"/>
<event type="org.jboss.seam.security.notLoggedIn">
<action execute="#{redirect.captureCurrentView}"/>
<action execute="#{identity.tryLogin()}"/>
谢谢,Seam 3没有使用components.xml来配置组件/bean
我认为Seam Security 3(从3.0.0.Final开始)没有内置的“记忆”功能。Seam 3没有使用components.xml来配置组件/bean 我认为Seam Security 3(从3.0.0.Final开始)没有内置的“记忆”功能。根据记忆,Seam Security 3.1没有集成,但该类已经集成 来自的已知记忆有两种模式:
- 第一种模式允许用户名作为cookie存储在用户的浏览器中,并将密码的输入留给浏览器(许多现代浏览器都能够记住密码)
- 第二种模式支持在cookie中存储唯一令牌,并允许用户在返回站点时自动进行身份验证,而无需提供密码
FacesContext.getCurrentInstance().addResponseCookie("cookieName", "myToken", null);
然后确保在登录之前调用您自己的CookieBean
<ui:fragment rendered="#{cookieBean.dummy}"/>
<h:form id="fLogin">
<h:inputText value="#{credentials.username}"/>
<h:inputSecret value="#{credentials.password}" redisplay="true"/>
<h:commandButton value="LOGIN" action="#{identity.login}"/>
</h:form>
根据RemeberMe,该类未集成seam-security-3.1,但该类已集成
来自的已知记忆有两种模式:
- 第一种模式允许用户名作为cookie存储在用户的浏览器中,并将密码的输入留给浏览器(许多现代浏览器都能够记住密码)
- 第二种模式支持在cookie中存储唯一令牌,并允许用户在返回站点时自动进行身份验证,而无需提供密码
FacesContext.getCurrentInstance().addResponseCookie("cookieName", "myToken", null);
然后确保在登录之前调用您自己的CookieBean
<ui:fragment rendered="#{cookieBean.dummy}"/>
<h:form id="fLogin">
<h:inputText value="#{credentials.username}"/>
<h:inputSecret value="#{credentials.password}" redisplay="true"/>
<h:commandButton value="LOGIN" action="#{identity.login}"/>
</h:form>
你的错误是什么?发生了什么事情让你知道它不起作用了?没有数据写入令牌表你使用了这个功能吗Justin@JustinSatyrI没有测试这个,我只是想让你受益,这样以后看到这个的人可以更容易地帮助你。你的错误是什么?发生了什么事情让你知道它不起作用了?没有数据写入令牌表你使用了这个功能吗Justin@JustinSatyrI没有测试这个,我只是想让你受益,这样以后看到这个的人可以更容易地帮助你。