0

我有两个应用程序,每个应用程序都位于它自己的服务器上。他们都使用带有标准设置的 Spring 安全性。我需要通过第二个应用程序访问第一个应用程序的问题。登录第二个应用程序时,我需要发送密码并登录到第一个应用程序。有人可以帮忙提供样品或提示吗?谢谢你。我在两个应用程序中的 spring-security.xml :

<beans:beans xmlns="http://www.springframework.org/schema/security"
xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans 
    http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
    http://www.springframework.org/schema/security 
    http://www.springframework.org/schema/security/spring-security-3.1.xsd">

<http pattern="/favicon.ico" security="none" />

<http auto-config="true">
    <intercept-url pattern="/**" access="ROLE_ADMIN"/>
</http>

<authentication-manager>
    <authentication-provider>
        <user-service>
            <user name="hey" password="there" authorities="ROLE_ADMIN" />
        </user-service>
    </authentication-provider>
</authentication-manager>

4

1 回答 1

2

您应该为此使用 CAS,而不是尝试跨应用程序访问或传递用户/传递。

请参考此链接以了解如何在这种情况下使用 CAS。

于 2012-07-24T09:49:19.000 回答