1

您好我正在Apache mod代理下使用openid实现spring security

    ProxyPass / http://localhost:8081/
    ProxyPassReverse / http://localhost:8081/ 

我代理tomcat url的地方。openid在没有代理的情况下工作正常,但使用代理spring OpenIDAuthenticationFilter发送buildReturnToUrl发送tomcat url(localhost:8081)而不是代理一个。即使我覆盖了这个,另一个问题也发生在ConsumerManager验证方法verifyReturnTo(String receivingUrl, AuthSuccess response)上。

有没有办法实现这一点,而不是重写整个 spring openid 类 filter 和 consumerManager 。

如果有人解决了这个问题,请告诉我,如果 spring 提供了一些东西来支持这种情况 OOB,因为这是一个常见的用例

xml配置

<openid-login default-target-url="/welcome"
            authentication-failure-handler-ref="openIdAuthFailureHandler"
            authentication-success-handler-ref="authenticationSuccessHandler" 
            >
            <attribute-exchange>
                <openid-attribute name="email"
                    type="http://axschema.org/contact/email" required="true" count="1" />
                <openid-attribute name="axContactEmail"
                    type="http://axschema.org/contact/email" required="true" />
                <openid-attribute name="oiContactEmail"
                    type="http://schema.openid.net/contact/email" required="true" />
                <openid-attribute name="axNamePersonFullname"
                    type="http://axschema.org/namePerson" required="true" />
                <openid-attribute name="axNamePersonFriendlyName"
                    type="http://axschema.org/namePerson/friendly" required="true" />
                <openid-attribute name="axNamePersonFirstName"
                    type="http://axschema.org/namePerson/first" required="true" />
                <openid-attribute name="axNamePersonLastName"
                    type="http://axschema.org/namePerson/last" required="true" />
            </attribute-exchange>
        </openid-login>

问候

4

0 回答 0