在Tomcat 7中扩展AuthenticatorBase

问题描述 投票:2回答:1

我正在尝试在Tomcat 7中创建自定义身份验证器。因此,我的理解是,我需要扩展AuthenticatorBase类(类似于FormAuthenticator),然后在web.xml中提及新的身份验证器的名称,如下所示:

<login-config>
    <auth-method>CUSTOMAUTH</auth-method>
</login-config>

从“ Custom Authenticator”类中创建一个Jar,并将其放入tomcatDir \ lib \

现在我在哪里提到“ CUSTOMAUTH”和我的类CustomAuthenticator.java之间的映射,它可能在com.authentication.custom.CustomAuthenticator.java中,]

[能否让我知道Windows(我的开发环境)和Linux(我们的实际服务器)的配置文件的路径。

如果我对上述任何步骤有误,请纠正我。

提前感谢您的时间!

[我正在尝试在Tomcat 7中创建自定义身份验证器。因此,我的理解是,我需要扩展AuthenticatorBase类(类似于FormAuthenticator),然后提及新的身份验证器的...

java tomcat tomcat7 basic-authentication form-authentication
1个回答
0
投票

您将需要重写方法

© www.soinside.com 2019 - 2024. All rights reserved.