---
title: "cas https 到 http "
author: "crawler"
date: "2010-08-05T09:57:43Z"
tags: ["Java", "SSO", "XML", "互联网", "浏览器"]
categories: ["Web前端"]
slug: "cas-https-http"
draft: false
lastmod: "2013-05-08T08:37:04Z"
id: 729475
url: "https://crawler.iteye.com/blog/729475"
---

最近做一个sso，用了耶鲁大学的cas，由于涉及到互联网的东西。如果用https不同浏览器都有安装CA证书要求，而且界面不一致，所以将https改为了http：

环境：JDK6+JBOSS4+CAS3.3（server）+cas-client-2.0.11

需要修改的地方：

1.注释casclient.jar的java\\src\\edu\\yale\\its\\tp\\cas\\util下的SecureURL.java

```
  if (!u.getProtocol().equals("https"))  throw new IOException("only 'https' URLs are valid for this  method");
```

 

2.修改服务端的ticketGrantingTicketCookieGenerator.xml

   p:cookieSecure="false" 改为false

 

就可以了。

 

 

附件是改过后的casclient.jar