gpt4 book ai didi

java - 如何实现 EAR-wide JAAS

转载 作者:搜寻专家 更新时间:2023-11-01 02:54:07 25 4
gpt4 key购买 nike

我想在包含多个 war 的整个 EAR 文件中实现 JAAS。

我已在每场 war 中成功设置它,但这意味着当用户在 war 之间切换时(通过超链接)他们必须为每场 war 重新登录,即使每场 war 都配置为使用相同的领域。

如何为整个 EAR 创建单点登录流程?

谢谢。

最佳答案

这通常是特定于容器的。对于 JBoss ,您可以为此目的使用 yourapp.ear/META-INF/jboss-app.xml。在这里,您定义了一个指向相应登录策略的 security-domain 元素。 DTD 摘录:

<!-- The security-domain element specifies the JNDI name of the security manager that implements the EJBSecurityManager and RealmMapping for the domain. When specified at the jboss level it specifies the security domain for all j2ee components in the deployment unit.
One can override the global security-domain at the container
level using the security-domain element at the container-configuration level.

Used in: jboss-app -->

<!ELEMENT security-domain (#PCDATA)>

关于java - 如何实现 EAR-wide JAAS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5141637/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com