CAS单点登录(1) :开始准备CAS认证中心服务,启动CAS服务端的部分配置,删除HTTPS认证,并更改CAS端口的默认登录用户名
然后启动CAS服务器访问CAS下载链接下载CAS4.0解压缩,找到/modules/cas-server-webapps-4.0.0.war,在Tomcat下的web app
查看上图所示的页面,表示服务器已成功启动。 在某些配置中,删除HTTPS认证
CAS默认采用HTTPS协议,在开发阶段不可用,因此可以改为使用HTTP。 首先,在Tomcat下的webapps目录中找到cas文件夹,然后修改XML bean,如下所示:
/we B- INF/deployerconfigcontext.XML
bean id=' proxyauthenticationhandler ' class=' org.ja SIG.cas.authentic ation.handler.support.htpbasedsedservicececrer lient '/we B- INF/spring-configuration/ticketgrantingticketcookietecokietecokietecokietecokietecokietecokietecokiet
bean id=' ticketgrantingticketcookiegenerator ' class=' org.ja SIG.cas.web.support.cookieretrievingcookiegenerator cookie path='/cas '/we B- INF/spring-configuration/warncookiegg
bean id=' warncookiegenerator ' class=' org.ja SIG.cas.web.support.cookieretrievingcookiegenerator ' p 3360 cokiessss='/CAS'/CAS端口更改如果更改了Tomcat的启动端口,则必须在CAS中进行相应的配置,并更改/CAS-server/web-inf/CAS
server.name=http://localhost :8080 #其中必须支持CAS服务器端的IP和端口。 server.prefix=$ { server.name }/CAS #对应于cas目录服务端的默认登录用户名。 CAS服务器启动后,可以通过示例用户登录。 可以在/we B- INF/deployerconfigcontext.XML中找到具有相应配置的bean。 在此将用户名设置为cypher,密码设置为123456。
bean id=' primaryauthenticationhandler ' class=' org.ja SIG.cas.authentic ation.acceptusersauthenticationhandler ' pration