cas5开启Restful接口验证

发布时间 2024-01-08 15:26:55作者: 李济宏(Amadeus)
  1. ​POM文件中加入rest依赖:
        <!-- Restful support -->
        <dependency>
            <groupId>org.apereo.cas</groupId>
            <artifactId>cas-server-support-rest</artifactId>
            <version>${cas.version}</version>
        </dependency>
  1. maven clean package,把war包扔到tomcat里,重新编译
  2. postman测试。
    官方文档如下:
POST /cas/v1/tickets HTTP/1.0
'Content-type': 'Application/x-www-form-urlencoded'
username=battags&password=password&additionalParam1=paramvalue

Postman模拟如下:
img