单点登录开源架构之CAS
2017-09-18 11:07 毛爷爷 阅读(1193) 评论(0) 编辑 收藏 举报服务端
开源地址:https://github.com/apereo/cas
Release版:https://github.com/apereo/cas/releases
Windows下使用下载cas服务端源码编译后放入tomcat的webapps中,修改下配置和host启动tomcat即可完成部署 ;
客户端接入
1、新建MVC项目,添加引用包
install-package DotNetCasClient
2、修改配置文件的认证服务器地址,上面添加过包以后会自动添加CAS的配置文件到Web.config
可以看出,主要是通过HttpModules实现验证
3、随便找个Action上打下标签[Authorize]测试
[Authorize] public ActionResult About() { ViewBag.Message = "Your application description page."; return View(); }
文档: