CAS 4.1.10關閉HTTPS

來源:互聯網
上載者:User

標籤:cas https

1.修改WEB-INF/deployerConfigContext.xml

    <bean id="proxyAuthenticationHandler"          class="org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler"          p:httpClient-ref="supportsTrustStoreSslSocketFactoryHttpClient"          p:requireSecure="false" />

在p:httpClient-ref="supportsTrustStoreSslSocketFactoryHttpClient"後

增加p:requireSecure="false"


2.修改WEB-INF/spring-configuration/ticketGrantingTicketCookieGenerator.xml

    <bean id="ticketGrantingTicketCookieGenerator" class="org.jasig.cas.web.support.CookieRetrievingCookieGenerator"          c:casCookieValueManager-ref="cookieValueManager"          p:cookieSecure="false"          p:cookieMaxAge="-1"          p:cookieName="TGC"          p:cookiePath=""/>

將p:cookieSecure="true"修改為p:cookieSecure="false"


3.修改WEB-INF/spring-configuration/warnCookieGenerator.xml

    <bean id="warnCookieGenerator" class="org.jasig.cas.web.support.CookieRetrievingCookieGenerator"          p:cookieHttpOnly="false"          p:cookieSecure="false"          p:cookieMaxAge="-1"          p:cookieName="CASPRIVACY"          p:cookiePath=""/>

將p:cookieSecure="true"修改為p:cookieSecure="false"


4.修改註冊服務WEB-INF/classes/services/HTTPSandIMAPS-10000001.json

將"serviceId" : "^(https|imaps)://.*"修改為"serviceId" : "^(https|http|imaps)://.*"


5.測試HTTP/HTTPS

http://192.168.10.102:8080/cas/login?service=http://www.a.com

650) this.width=650;" src="http://s1.51cto.com/wyfs02/M00/8A/AF/wKioL1g35rPwNMwCAAFKgMZKaFc573.png" title="11.png" alt="wKioL1g35rPwNMwCAAFKgMZKaFc573.png" />



網上很多資料只提示修改前面3個配置,卻沒有更改註冊服務配置,所以就會出現

Application Not Authorized to Use CAS

The application you attempted to authenticate to is not authorized to use CAS.

650) this.width=650;" src="http://s3.51cto.com/wyfs02/M00/8A/B0/wKioL1g355fzxJuZAAC_YtKcIGA432.png" title="123.png" alt="wKioL1g355fzxJuZAAC_YtKcIGA432.png" />


本文出自 “楓林晚” 部落格,請務必保留此出處http://fengwan.blog.51cto.com/508652/1876603

CAS 4.1.10關閉HTTPS

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.