有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java如何使用websphere 7.0对web服务进行基本身份验证

我正在尝试使用WebSphere7.0对我的web服务进行基本身份验证

我尝试在was中创建用户和组,并在web中声明安全角色。xml

但是在将用户映射到我的web服务提供商应用程序时遇到了问题

对于使用WAS7.0进行基本身份验证,这是正确的方法还是有更好的方法

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
     version="3.0">

    <security-constraint>
        <display-name>Constraint-0</display-name>
        <web-resource-collection>
            <web-resource-name>Constraint-0</web-resource-name>
            <url-pattern>/*</url-pattern>
        </web-resource-collection>
        <auth-constraint>
            <role-name>test</role-name>
        </auth-constraint>
        <user-data-constraint>
            <transport-guarantee>NONE</transport-guarantee>
        </user-data-constraint>
    </security-constraint>
    <login-config>
        <auth-method>BASIC</auth-method>
    </login-config>
    <security-role>
        <role-name>test</role-name>
    </security-role>
    <session-config>
        <session-timeout>
            30
        </session-timeout>
    </session-config>
</web-app>

共 (0) 个答案