<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>第 9 章 单点登录</title><link rel="stylesheet" href="html.css" tppabs="http://family168.com/oa/springsecurity/shared/styles/html.css" type="text/css"><meta name="generator" content="DocBook XSL-NS Stylesheets V1.73.2"><link rel="start" href="index.html" title="Spring Security"><link rel="up" href="pt02-web.html" title="部分 II. 保护web篇"><link rel="prev" href="ch102-concurrent-session.html" title="第 8 章 管理会话"><link rel="next" href="ch104-basic.html" title="第 10 章 basic认证"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div xmlns:fo="http://www.w3.org/1999/XSL/Format" style="background-color:white;border:none;height:73px;border:1px solid black;"><a style="border:none;" href="javascript:if(confirm('http://www.family168.com/ \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.family168.com/'" tppabs="http://www.family168.com/" title="Family168"><img src="family168.png" tppabs="http://family168.com/oa/springsecurity/shared/images/family168.png" border="0"></a></div><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">第 9 章 单点登录</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch102-concurrent-session.html" tppabs="http://family168.com/oa/springsecurity/html/ch102-concurrent-session.html">上一页</a> </td><th width="60%" align="center">部分 II. 保护web篇</th><td width="20%" align="right"> <a accesskey="n" href="ch104-basic.html" tppabs="http://family168.com/oa/springsecurity/html/ch104-basic.html">下一页</a></td></tr></table><hr></div><div class="chapter" lang="zh-cn"><div class="titlepage"><div><div><h2 class="title"><a name="ch103-cas"></a>第 9 章 单点登录</h2></div></div></div><p>所谓单点登录,SSO(Single Sign On),就是把N个应用的登录系统整合在一起,这样一来无论用户登录了任何一个应用,都可以直接以登录过的身份访问其他应用,不用每次访问其他系统再去登陆一遍了。</p><p>Spring Security没有实现自己的SSO,而是整合了耶鲁大学单点登陆(JA-SIG),这是当前使用很广泛的一种SSO实现,它是基于中央认证服务CAS(Center Authentication Service)的结构实现的,可以访问它们的官方网站获得更详细的信息<a class="ulink" href="javascript:if(confirm('http://www.jasig.org/cas \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.jasig.org/cas'" tppabs="http://www.jasig.org/cas" target="_top">http://www.jasig.org/cas</a>。</p><p>在了解过这些基础知识之后,我们可以开始研究如何使用Spring Security实现单点登录了。</p><div class="sect1" lang="zh-cn"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="d0e981"></a>9.1. 配置JA-SIG</h2></div></div></div><p>从JA-SIG的官方网站下载cas-server,本文写作时的最新稳定版为3.3.2。<a class="ulink" href="javascript:if(confirm('http://www.ja-sig.org/downloads/cas/cas-server-3.3.2-release.zip \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='http://www.ja-sig.org/downloads/cas/cas-server-3.3.2-release.zip'" tppabs="http://www.ja-sig.org/downloads/cas/cas-server-3.3.2-release.zip" target="_top">http://www.ja-sig.org/downloads/cas/cas-server-3.3.2-release.zip</a>。</p><p>将下载得到的cas-server-3.3.2-release.zip文件解压后,可以得到一大堆的目录和文件,我们这里需要的是modules目录下的cas-server-webapp-3.3.2.war。</p><p>把cas-server-webapp-3.3.2.war放到ch09\server目录下,然后执行run.bat就可启动CAS中央认证服务器。</p><p>我们已在pom.xml中配置好了启用SSL所需的配置,包括使用的server.jks和对应密码,之后我们可以通过<a class="ulink" href="javascript:if(confirm('https://localhost:9443/cas/login \n\nThis file was not retrieved by Teleport Ultra, because it is addressed on a domain or path outside the boundaries set for its Starting Address. \n\nDo you want to open it from the server?'))window.location='https://localhost:9443/cas/login'" tppabs="https://localhost:9443/cas/login" target="_top">https://localhost:9443/cas/login</a>访问CAS中央认证服务器。</p><div class="figure"><a name="d0e996"></a><div class="figure-contents"><div><img src="ch103-01.png" tppabs="http://family168.com/oa/springsecurity/shared/images/ch103-01.png" alt="登陆页面"></div></div><p class="title"><b>图 9.1. 登陆页面</b></p></div><br class="figure-break"><p>默认情况下,只要输入相同的用户名和密码就可以登陆系统,比如我们使用user/user进行登陆。</p><div class="figure"><a name="d0e1002"></a><div class="figure-contents"><div><img src="ch103-02.png" tppabs="http://family168.com/oa/springsecurity/shared/images/ch103-02.png" alt="登陆成功"></div></div><p class="title"><b>图 9.2. 登陆成功</b></p></div><br class="figure-break"><p>这就证明中央认证服务器已经跑起来了。下一步我们来配置Spring Security,让它&
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
family168SpringSecurity管理手册.rar (90个子文件)
family168
ch104-basic.html 12KB
2.png 353B
ch112-02.png 7KB
ch003-custom-db.html 14KB
ch103-03.png 5KB
3.png 350B
preface.html 14KB
ch401-02.png 9KB
note.png 490B
ch001-02.png 6KB
ch004-01.png 3KB
ap06-exception.html 9KB
ap07-event.html 5KB
ch401-06.png 7KB
ch001-helloworld.html 26KB
ch006-user-info.html 24KB
ch101-filters.html 21KB
ch401-03.png 12KB
ch104-02.png 8KB
ch101-11.png 12KB
ch001-01.png 4KB
ch103-04.png 20KB
5.png 348B
ch101-03.png 18KB
ch111-channel.html 8KB
ch203-voter.html 8KB
pt05-practice.html 5KB
ch103-cas.html 31KB
ch001-05.png 540B
tip.png 449B
ch105-taglib.html 14KB
ch101-01.png 47KB
ch401-basic.html 26KB
pt01-quickstart.html 6KB
ap05-database-schema.html 7KB
ch107-03.png 1KB
index.htm 31KB
ch108-sessionfix.html 10KB
ch101-04.png 21KB
1.png 329B
ch112-01.png 8KB
ch106-01.png 4KB
ch201-method.html 15KB
ap01-history.html 17KB
ch101-12.png 21KB
ch103-01.png 26KB
pt03-method.html 4KB
ap02-faq.html 9KB
ch101-05.png 19KB
ch101-10.png 22KB
ch002-database.html 15KB
ch004-custom-login.html 18KB
pt04-acl.html 5KB
ap04-namespace.html 14KB
ch004-02.png 4KB
ch101-07.png 14KB
ch401-01.png 9KB
ch101-02.png 19KB
ch401-04.png 9KB
ch107-anonymous.html 19KB
ch110-switchuser.html 9KB
ch101-09.png 14KB
ch104-01.png 8KB
ch106-02.png 15KB
ch401-07.png 8KB
ch106-rememberme.html 13KB
ch107-01.png 2KB
ch112-digest.html 11KB
pt02-web.html 6KB
ch204-intercepter.html 5KB
ch109-01.png 8KB
ch103-02.png 21KB
ch005-01.png 26KB
4.png 345B
ch102-concurrent-session.html 12KB
ch101-08.png 14KB
ap03-springsecurity3.html 6KB
ch109-preauth.html 15KB
ch301-acl.html 23KB
family168.png 8KB
ch102-01.png 8KB
ch003-01.png 13KB
ch202-base.html 15KB
ch005-resource-db.html 25KB
ch001-03.png 995B
ch101-06.png 22KB
ch107-02.png 2KB
ch401-05.png 7KB
html.css 3KB
springsecurity-sample.rar 73KB
共 90 条
- 1
资源评论
- daizijian1682013-11-02对学习SpringSecurity帮助很大
- azugege2013-02-26很好的东西啊,对学习SpringSecurity帮助很大
chinaway
- 粉丝: 2
- 资源: 14
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功