cas单点登录客户端验证通过后返回,有不明白的地方,望解惑,谢谢!
今天学习 CAS 单点登录,根据网上的教程一步一步都很顺利,server 也启动了,客户端的请求也都能验证了,
但是有个问题闹不明白,
服务端的tomcat 中的server.xml 是这么配置的:
客户端的web.xml 文件中是这么配置的:
上面的配置有一个点一直不明白,就是:
我客户端是在端口80上启动的,访问 http://localhost/index.html 会跳转到登录验证,登录成功后确返回到 http://localhost:8080/index.html?ticket=ST-1-hBixgj7pOqb1gRbpOZs1-cas01.example.org 页面显示空白
想问一下,怎么返回到 客户端的页面,即返回到:http://localhost/index.html
我如果访问 http://localhost/test.html 就是跳转到 http://localhost:8080/test.html?ticket=ST-1-hBixgj7pOqb1gRbpOZs1-cas01.example.org 页面也显示空白
这样正确吗?服务器登录认证完了不是应该回到客户端这边的吗?
但是有个问题闹不明白,
服务端的tomcat 中的server.xml 是这么配置的:
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />
<Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol" SSLEnabled="true"
maxThreads="150" scheme="https" secure="true"
clientAuth="false" sslProtocol="TLS"
keystoreFile="d:/tools/cas/key/caskey"
keystorePass="111111"/>
客户端的web.xml 文件中是这么配置的:
<!-- 该过滤器负责用户的认证工作,必须启用它 -->
<filter>
<filter-name>CASFilter</filter-name>
<filter-class>org.jasig.cas.client.authentication.AuthenticationFilter</filter-class>
<init-param>
<param-name>casServerLoginUrl</param-name>
<param-value>https://localhost:8443/cas/login</param-value>
</init-param>
<init-param>
<!--这里的server是服务端的IP -->
<param-name>serverName</param-name>
<param-value>http://localhost:8080</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>CASFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<!-- 该过滤器负责对Ticket的校验工作,必须启用它 -->
<filter>
<filter-name>CAS Validation Filter</filter-name>
<filter-class>
org.jasig.cas.client.validation.Cas20ProxyReceivingTicketValidationFilter</filter-class>
<init-param>
<param-name>casServerUrlPrefix</param-name>
<param-value>https://localhost:8443/cas</param-value>
</init-param>
<init-param>
<param-name>serverName</param-name>
<param-value>http://localhost:8080</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>CAS Validation Filter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
上面的配置有一个点一直不明白,就是:
<init-param>
<param-name>serverName</param-name>
<param-value>http://localhost:8080</param-value>
</init-param>
我客户端是在端口80上启动的,访问 http://localhost/index.html 会跳转到登录验证,登录成功后确返回到 http://localhost:8080/index.html?ticket=ST-1-hBixgj7pOqb1gRbpOZs1-cas01.example.org 页面显示空白
想问一下,怎么返回到 客户端的页面,即返回到:http://localhost/index.html
我如果访问 http://localhost/test.html 就是跳转到 http://localhost:8080/test.html?ticket=ST-1-hBixgj7pOqb1gRbpOZs1-cas01.example.org 页面也显示空白
这样正确吗?服务器登录认证完了不是应该回到客户端这边的吗?
...全文
相关推荐
springboot集成CAS实现单点登录的示例代码
配置CAS客户端时,需要设置CAS服务器的URL、服务验证端点以及应用程序的服务ID。集成步骤大致如下:1.
无https验证的CAS单点登录
**无HTTPS验证的CAS单点登录详解**CAS(Central Authentication Service,中央认证服务)是一种广泛应用于Web应用程序的身份验证框架,旨在提供一种集中化的身份验证机制
单点登录cas服务器demo及springboot客户端demo
服务票证(Service Ticket):验证成功后,CAS服务器向客户端应用返回一个服务票证,作为用户已经验证过的证据。3. 验证服务:客户端应用收到服务票证后,会将其发送回CAS服务器进行验证。
cas客户端集成单点登录代码
- 服务验证:用户在CAS服务器成功登录后,服务器会返回一个服务票证(Service Ticket)给客户端,客户端需要验证这个票证的有效性。
cas实现单点登录,登出(java和php客户端)
标题中的“CAS实现单点登录,登出(Java和PHP客户端)”指的是使用中央认证服务(Central Authentication Service,简称CAS)来构建一个跨域、跨平台的单点登录(Single


Web 开发
