无状态CAS-提供的代理回调URL j_spring_cas_security_proxyreceptor'无法通过身份验证 [英] Stateless CAS - The supplied proxy callback url j_spring_cas_security_proxyreceptor' could not be authenticated

查看:94
本文介绍了无状态CAS-提供的代理回调URL j_spring_cas_security_proxyreceptor'无法通过身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要使用CAS保护我的RESTful无状态Web服务,现在我正在尝试遵循

这可能是什么原因?

解决方案

通过添加

解决

 <属性名称="proxyReceptorUrl" value ="/j_spring_cas_security_proxyreceptor"/> 

casFilter

这是 applicationContext-security.xml 中的 casFilter :

 < bean id ="casFilter"class ="org.springframework.security.cas.web.CasAuthenticationFilter"><属性名称="authenticationManager" ref ="authenticationManager"/><属性名称="proxyGrantingTicketStorage" ref ="pgtStorage"/><属性名称="serviceProperties" ref ="serviceProperties"/><属性名称="proxyReceptorUrl" value ="/j_spring_cas_security_proxyreceptor"/><属性名称="authenticationDetailsS​​ource">< bean class ="org.springframework.security.cas.web.authentication.ServiceAuthenticationDetailsS​​ource"/></property></bean> 

I need to secure my RESTful stateless webservices with CAS and right now I'm trying to follow this Spring Stateless CAS demo but continuously getting a following error:

22:42:27.885 [http-nio-8443-exec-8] [first-spring-stateless] DEBUG o.s.s.c.web.CasAuthenticationFilter - Authentication request failed: org.springframework.security.authentication.BadCredentialsException: 
            The supplied proxy callback url 'https://localhost:8443/first-spring-stateless/j_spring_cas_security_proxyreceptor' could not be authenticated.

when accessing https://localhost:8443/first-spring-cas/testProxy.do url

This is for example my appointmentServiceUrl - https://localhost:8443/first-spring-stateless/appointment.jsp?ticket=PT-110-a2a6eOE3lwImcwGpZ2Jp-cas.example.com

What can be a reason of that ?

解决方案

Solved by adding

<property name="proxyReceptorUrl"               value="/j_spring_cas_security_proxyreceptor"/>

to casFilter

This is casFilter in the applicationContext-security.xml:

 <bean id="casFilter"
        class="org.springframework.security.cas.web.CasAuthenticationFilter">
    <property name="authenticationManager"          ref="authenticationManager"/>
    <property name="proxyGrantingTicketStorage"     ref="pgtStorage"/>
    <property name="serviceProperties"              ref="serviceProperties"/>

    <property name="proxyReceptorUrl"               value="/j_spring_cas_security_proxyreceptor"/>
    <property name="authenticationDetailsSource">
      <bean class="org.springframework.security.cas.web.authentication.ServiceAuthenticationDetailsSource"/>
    </property>
  </bean>

这篇关于无状态CAS-提供的代理回调URL j_spring_cas_security_proxyreceptor'无法通过身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆