CAS覆盖重定向注销到另一个URL

时间:2020-03-26 21:07:39

标签: spring overlay cas

使用CAS Overlay 5.1 Spring Boot CAS身份验证服务器。 我想将注销从https://ip:8443/cas/logout重定向到http://ip:8080/app/page.html 在我的cas文件中,我已激活:

cas.logout.followServiceRedirects=true
cas.logout.redirectUrl=http\://ip\:8080/app/page.html

在我的会话中,我也使用LDAP,而我的服务注册表也有:

{

  "@class" : "org.apereo.cas.services.RegexRegisteredService",
  "serviceId" : "^http://ip:8080/app/.*",
  "name" : "CAS Spring Secured App",
  "description": "Cas",
  "logoutUrl" : "http://ip:8080/app/page.html",
  "logoutType" : "BACK_CHANNEL",
  "id" : 1001,
  "evaluationOrder" : 0,
  "attributeReleasePolicy" : {
    "@class" : "org.apereo.cas.services.ReturnAllowedAttributeReleasePolicy",
    "principalAttributesRepository" : {
      "@class" : "org.apereo.cas.authentication.principal.DefaultPrincipalAttributesRepository"
    },
    "authorizedToReleaseCredentialPassword" : false,
    "authorizedToReleaseProxyGrantingTicket" : true
  } ,
  "publicKey" : {
    "@class" : "org.apereo.cas.services.RegisteredServicePublicKeyImpl",
    "location" : "classpath:RSA1024Public.key",
    "algorithm" : "RSA"
  }
}

问题是它总是带我到页面(图像),我在做什么错? enter image description here

1 个答案:

答案 0 :(得分:1)

cas.logout.followServiceRedirects = true

这仅在您以/cas/logout?service=http://ip:8080/app/page.html的身份提交请求时有效

cas.logout.redirectUrl = http:// ip:8080 / app / page.html

  • 这应该是http://ip:8080/app/page.html
  • 打开重定向到HTTP URL是可疑的做法。
  • 此属性does not exist对于CAS 5.1.x。
相关问题