Ale*_*ian 3 java authentication websphere tomcat basic-authentication
我正在尝试将J2EE应用程序从Tomcat移植到Websphere,我对Websphere不太熟悉.
我遇到的唯一问题是授权(我在web.xml中使用基本身份验证).在Tomcat中,我使用tomcat-users.xml文件来定义我的用户/密码以及它们所属的角色.
我如何"简单地"在Websphere中执行此操作?在将EAR部署到Websphere时,它还要求我将我的角色从web.xml映射到用户或组.
我必须设置某种领域吗?自定义用户注册?
谢谢.
更新:
我配置了一个独立的自定义注册表,但我无法获得用户名/密码的登录提示.它在Tomcat中运行得很好,而在Websphere中却没有.
来自web.xml的代码
<security-constraint>
<web-resource-collection>
<web-resource-name>basic-auth security</web-resource-name>
<url-pattern>/*</url-pattern>
</web-resource-collection>
<auth-constraint>
<role-name>HELLO_USER</role-name>
</auth-constraint>
<user-data-constraint>NONE</user-data-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
</login-config>
<security-role>
<role-name>HELLO_USER</role-name>
</security-role>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
8233 次 |
| 最近记录: |