ExtendedFormAuthenticator in JBoss 7



我正在将一个遗留应用程序从JBoss 4.2.3移植到JBoss 7 (web配置文件版本)。他们使用一个自定义登录模块,并使用一个阀门将登录失败原因捕获到j_exception中。他们将context.xml放入war的web-inf目录中,包含以下内容:

<!-- Add the ExtendedFormAuthenticator to get access to the username/password/exception ->
<Context cookies="true" crossContext="true">
<Valve className="org.jboss.web.tomcat.security.ExtendedFormAuthenticator"
       includePassword="true" ></Valve>
</Context>

登录是为我工作,但不是阀门。当出现登录异常时,j_exception仍然为空,依赖于分析登录被拒绝原因的逻辑失败。根据这个链接:http://community.jboss.org/wiki/ExtendedFormAuthenticator,一切看起来都是正确的。然而,这种联系是非常古老的,从那以后事情可能发生了变化。新的方式是什么?

安全阀现在似乎是直接在jboss-web.xml中定义的,像这样:

<jboss-web>
<security-domain>mydomain</security-domain>   
<valve>
       <class-name>org.jboss.web.tomcat.security.ExtendedFormAuthenticator</class-name>
       <param>
           <param-name>includePassword</param-name>
           <param-value>true</param-value>
       </param>
    </valve>
</jboss-web>
然而,ExtendedFormAuthenticator类并没有移植到JBoss 7.0.1。一个票证已经为我打开了,所以它应该出现在JBoss 7.1.0中:https://issues.jboss.org/browse/as7 - 1963

最新更新