【发布时间】:2015-11-27 13:05:15
【问题描述】:
在我之前的项目中,我们使用 jboss 7 作为应用程序服务器,而我的应用程序在 jboss-web.xml 中有如下代码。
<jboss-web>
<security-domain>my-form-auth</security-domain>
<context-root>webapps</context-root>
<valve>
<class-name>com.session.MyAuthenticaor</class-name>
</valve>
</jboss-web>
它工作正常。但是目前我们升级到wildfly 8.2.1并且阀门没有被任何请求调用。阀门用于自定义身份验证。阀门代码如下。
包 com.session;
import java.io.IOException;
import org.apache.catalina.authenticator.FormAuthenticator;
import org.apache.catalina.connector.Request;
import org.apache.catalina.connector.Response;
import org.apache.catalina.deploy.LoginConfig;
public class MyAuthenticaor extends FormAuthenticator{
public boolean authenticate(Request request, Response response,LoginConfig config) throws IOException {
//code for authentication
}
}
请帮我解决这个问题。
【问题讨论】: