﻿{"id":288,"date":"2015-07-22T15:27:58","date_gmt":"2015-07-22T07:27:58","guid":{"rendered":"http:\/\/blog.sway.com.cn\/?p=288"},"modified":"2015-07-22T16:56:29","modified_gmt":"2015-07-22T08:56:29","slug":"%e5%8f%96%e6%b6%88cas%e7%9a%84https%e7%99%bb%e9%99%86","status":"publish","type":"post","link":"http:\/\/blog.sway.com.cn\/?p=288","title":{"rendered":"\u53d6\u6d88CAS\u7684HTTPS\u767b\u9646"},"content":{"rendered":"<p>1\u3001\u4fee\u6539WEB-INF\\deployerConfigContext.xml\uff0c\u52a0\u5165<\/p>\n<pre class=\"lang:default decode:true\"> p:requireSecure=\"false\"<\/pre>\n<p>\u5373<\/p>\n<pre class=\"lang:default decode:true\">&lt;property name=\"authenticationHandlers\"&gt;\r\n\t\t\t&lt;list&gt;\r\n\t\t\t\t&lt;!--\r\n\t\t\t\t\t| This is the authentication handler that authenticates services by means of callback via SSL, thereby validating\r\n\t\t\t\t\t| a server side SSL certificate.\r\n\t\t\t\t\t+--&gt;\r\n\t\t\t\t&lt;bean class=\"org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler\"\r\n\t\t\t\t\tp:httpClient-ref=\"httpClient\" p:requireSecure=\"false\"\/&gt;\r\n\t\t\t\t&lt;!--\r\n\t\t\t\t\t| This is the authentication handler declaration that every CAS deployer will need to change before deploying CAS \r\n\t\t\t\t\t| into production.  The default SimpleTestUsernamePasswordAuthenticationHandler authenticates UsernamePasswordCredentials\r\n\t\t\t\t\t| where the username equals the password.  You will need to replace this with an AuthenticationHandler that implements your\r\n\t\t\t\t\t| local authentication strategy.  You might accomplish this by coding a new such handler and declaring\r\n\t\t\t\t\t| edu.someschool.its.cas.MySpecialHandler here, or you might use one of the handlers provided in the adaptors modules.\r\n\t\t\t\t\t+--&gt;\r\n\t\t\t\t&lt;bean\r\n\t\t\t\t\tclass=\"org.jasig.cas.authentication.handler.support.SimpleTestUsernamePasswordAuthenticationHandler\" \/&gt;\r\n\t\t\t&lt;\/list&gt;\r\n\t\t&lt;\/property&gt;<\/pre>\n<p>2\u3001\u4fee\u6539WEB-INF\\spring-configuration\\ticketGrantingTicketCookieGenerator.xml\uff0c\u4fee\u6539p:cookieSecure=&#8221;false&#8221;<\/p>\n<pre class=\"lang:default decode:true  \">\t&lt;bean id=\"ticketGrantingTicketCookieGenerator\" class=\"org.jasig.cas.web.support.CookieRetrievingCookieGenerator\"\r\n\t\tp:cookieSecure=\"false\"\r\n\t\tp:cookieMaxAge=\"-1\"\r\n\t\tp:cookieName=\"CASTGC\"\r\n\t\tp:cookiePath=\"\/cas\" \/&gt;<\/pre>\n<p>3\u3001\u4fee\u6539\u4fee\u6539WEB-INF\\spring-configuration\\warnCookieGenerator.xml\uff0c\u4fee\u6539p:cookieSecure=&#8221;false&#8221;<\/p>\n<pre class=\"lang:default decode:true \">\t&lt;bean id=\"warnCookieGenerator\" class=\"org.jasig.cas.web.support.CookieRetrievingCookieGenerator\"\r\n\t\tp:cookieSecure=\"false\"\r\n\t\tp:cookieMaxAge=\"-1\"\r\n\t\tp:cookieName=\"CASPRIVACY\"\r\n\t\tp:cookiePath=\"\/cas\" \/&gt;<\/pre>\n<p>\u7ecf\u8fc7\u4ee5\u4e0a\u4e09\u6b65\uff0ccas server\u7aef\u4fee\u6539\u5b8c\u6bd5<\/p>\n","protected":false},"excerpt":{"rendered":"<p>1\u3001\u4fee\u6539WEB-INF\\deployerConfigContext.xml\uff0c\u52a0\u5165 &hellip; <a href=\"http:\/\/blog.sway.com.cn\/?p=288\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[55],"tags":[56],"class_list":["post-288","post","type-post","status-publish","format-standard","hentry","category-sso","tag-cas"],"_links":{"self":[{"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/288","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=288"}],"version-history":[{"count":3,"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/288\/revisions"}],"predecessor-version":[{"id":291,"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=\/wp\/v2\/posts\/288\/revisions\/291"}],"wp:attachment":[{"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=288"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=288"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/blog.sway.com.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=288"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}