2011-09-27 53 views
1

我將一個遺留應用程序從JBoss 4.2.3移植到JBoss 7(Web配置文件版本)。他們使用自定義登錄模塊並使用閥門將登錄失敗原因捕獲到j_exception中。他們通過把context.xml的投入戰爭的WEB-INF目錄,其內容如下:JBoss 7中的ExtendedFormAuthenticator

<!-- 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,一切都看起來不錯。然而,這種聯繫是非常古老的,從那時起事情就有可能發生變化。新方法是什麼?

回答

0

看來,安全閥門現在的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