cas4.2.7 取消https

Posted 书山有路勤为径,学海无涯苦作舟(肖建锋)

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了cas4.2.7 取消https相关的知识,希望对你有一定的参考价值。

cas.properties 修改两个地方

# Decides whether SSO cookie should be created only under secure connections.
 tgc.secure=false

# The expiration value of the SSO cookie
# tgc.maxAge=-1

# The name of the SSO cookie
# tgc.name=TGC

# The path to which the SSO cookie will be scoped
# tgc.path=/cas

# The expiration value of the SSO cookie for long-term authentications
# tgc.remember.me.maxAge=1209600

# Decides whether SSO Warning cookie should be created only under secure connections.
 warn.cookie.secure=false

casLoginView.jsp

<jsp:directive.include file="includes/top.jsp" />

<%--<c:if test="${not pageContext.request.secure}">
    <div id="msg" class="errors">
        <h2><spring:message code="screen.nonsecure.title" /></h2>
        <p><spring:message code="screen.nonsecure.message" /></p>
    </div>
</c:if>--%>

注销上面的代码

HTTPSandIMAPS-10000001.json 中增加http的service

{
  "@class" : "org.jasig.cas.services.RegexRegisteredService",
  "serviceId" : "^(https|imaps|http)://.*",
  "name" : "HTTPS and IMAPS",
  "id" : 10000001,
  "description" : "This service definition authorized all application urls that support HTTPS and IMAPS protocols.",
  "proxyPolicy" : {
    "@class" : "org.jasig.cas.services.RefuseRegisteredServiceProxyPolicy"
  },
  "evaluationOrder" : 10000,
  "usernameAttributeProvider" : {
    "@class" : "org.jasig.cas.services.DefaultRegisteredServiceUsernameProvider"
  },
  "logoutType" : "BACK_CHANNEL",
  "attributeReleasePolicy" : {
    "@class" : "org.jasig.cas.services.ReturnAllowedAttributeReleasePolicy",
    "principalAttributesRepository" : {
      "@class" : "org.jasig.cas.authentication.principal.DefaultPrincipalAttributesRepository"
    },
    "authorizedToReleaseCredentialPassword" : false,
    "authorizedToReleaseProxyGrantingTicket" : false
  },
  "accessStrategy" : {
    "@class" : "org.jasig.cas.services.DefaultRegisteredServiceAccessStrategy",
    "enabled" : true,
    "ssoEnabled" : true
  }
}

 

以上是关于cas4.2.7 取消https的主要内容,如果未能解决你的问题,请参考以下文章

cas4.2.7 集群服务搭建

cas4.2.7与shiro进行整合

cas4.2.7实现单点登录

cas4.2.7单点登录带验证码服务端客户端搭建

CAS 5.3.1系列之使用cas overlay搭建服务端

如何取消订阅RxKotlin / RxJava中的Flowable?