cas的rest协议请求方式

来源:互联网 发布:wto关税数据库 编辑:程序博客网 时间:2024/06/05 16:53
  • 1.cas-server-webapp加入restlet配置
  • 2.客户端请求
    请求URL:
http://192.168.20.103:8080/cas-server-webapp/v1/tickets

请求体:

username=admin&password=123456&service=http://192.168.20.103:8080/zgr-cas-integrate

响应信息:

状态码:201 Created返回头:Location: http://192.168.20.103:8080/cas-server-webapp/v1/tickets/TGT-1-QhLSedphPddTvizOLQL2gpnifvfWUZ0c0sPhWzeTYdbSKlOIT7-cas01.example.orgDate: Tue, 11 Aug 2015 07:50:52 GMTServer: Restlet-Framework/2.1.0Accept-Ranges: bytesContent-Length: 463Content-Type: text/html;charset=UTF-8返回体:<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\"><html><head><title>201 The request has been fulfilled and resulted in a new resource being created</title></head><body><h1>TGT Created</h1><form action="http://192.168.20.103:8080/cas-server-webapp/v1/tickets/TGT-1-QhLSedphPddTvizOLQL2gpnifvfWUZ0c0sPhWzeTYdbSKlOIT7-cas01.example.org" method="POST">Service:<input type="text" name="service" value=""><br><input type="submit" value="Submit"></form></body></html>
  • 3.根据TGT获取ST
http://192.168.20.103:8080/cas-server-webapp/v1/tickets/TGT-1-QhLSedphPddTvizOLQL2gpnifvfWUZ0c0sPhWzeTYdbSKlOIT7-cas01.example.orgservice=http%3A%2F%2F192.168.20.103%3A8080%2Fzgr-cas-integrate
0 1