如何捕获 LTPA WebSphere 异常

发布于 2024-10-04 08:51:55 字数 740 浏览 11 评论 0原文

在 WebSphere 7 中使用 LTPA 基本认证时,如果密码不正确,则会抛出异常:

[11/24/10 14:51:44:405 CET] 00000011 exception     W com.ibm.ws.wim.adapter.file.was.FileAdapter login 
                             com.ibm.websphere.wim.exception.PasswordCheckFailedException: CWWIM4512E The password match failed.

at com.ibm.ws.wim.adapter.file.was.FileAdapter.login(FileAdapter.java:2009) 在 com.ibm.ws.wim.ProfileManager.loginImpl(ProfileManager.java:3338) 在 com.ibm.ws.wim.ProfileManager.genericProfileManagerMethod(ProfileManager.java:270) 在 com.ibm.ws.wim.ProfileManager.login(ProfileManager.java:374)

这是在我的部署描述符 (web.xml) 中启用的基本身份验证,而不是基于表单。
问题:有没有办法捕获这个异常?这是在请求到达我的 servlet 之前抛出的。

感谢您的阅读。

When using LTPA basic authentication with WebSphere 7 if a password is incorrect an exception is thrown thus:

[11/24/10 14:51:44:405 CET] 00000011 exception     W com.ibm.ws.wim.adapter.file.was.FileAdapter login 
                             com.ibm.websphere.wim.exception.PasswordCheckFailedException: CWWIM4512E The password match failed.

at com.ibm.ws.wim.adapter.file.was.FileAdapter.login(FileAdapter.java:2009)
at com.ibm.ws.wim.ProfileManager.loginImpl(ProfileManager.java:3338)
at com.ibm.ws.wim.ProfileManager.genericProfileManagerMethod(ProfileManager.java:270)
at com.ibm.ws.wim.ProfileManager.login(ProfileManager.java:374)

This is with basic authentication enabled in my deployment descriptor (web.xml) not form based.
The question: Is there a way to catch this exception? This is thrown before the request reaches my servlets.

Thanks for reading.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

鹊巢 2024-10-11 08:51:55

如果您坚持要捕获这种情况,您应该开发自定义 信任关联拦截器 必须处理基本身份验证,包括错误处理或 自定义 JAAS 登录模块。

If you insisted on catching that situation you should develop either custom Trust Association Interceptor that would have to handle the basic authentication including the error handling or custom JAAS login module.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文