更新时间:2024-04-26 GMT+08:00
分享

CAS协议API

CAS3.0协议下应用检验用户信息包括如下:

<cas:serviceResponse xmlns:cas="http://www.yale.edu/tp/cas"> 
<cas:authenticationSuccess> 
<cas:user>zhangsan</cas:user> 
<cas:attributes> 
<cas:authenticationDate>2021-11-17T01:37:52.729Z</cas:authenticationDate> 
<cas:longTermAuthenticationRequestTokenUsed>false</cas:longTermAuthenticationRequestTokenUsed> 
<cas:isFromNewLogin>true</cas:isFromNewLogin> 
<cas:role>admin</cas:role> 
<cas:organizationCode>10000</cas:organizationCode> 
<cas:name>张三</cas:name> 
<cas:userName>zhangsan</cas:userName> 
<cas:tenant>******</cas:tenant> 
</cas:attributes> 
</cas:authenticationSuccess> 
</cas:serviceResponse>

CAS3.0协议用户信息参数说明:

参数名

类型

参数说明

描述

name

String

用户姓名、昵称

/

userName

String

用户账号

登录账号,与同步接口中的username是一致的

tenant

String

企业的domainId

与同步接口中的domainId

role

String

用户角色

user --代表用户,admin-- 代表企业管理员

organizationCode

String

组织机构编码

与同步接口中的orgCode是一致的

主要涉及到接口:

验证票据(CAS3.0)

URI: GET /api/v1/cas/p3/serviceValidate

Query参数

参数

是否必选

参数类型

描述

format

String

响应用户信息的格式,可选择XMLJSON

缺省值:JSON

service

String

应用接受票据的地址,必须与应用CAS配置中的应用回调URL一致(URL编码)

ticket

String

票据,认证登录获取的Service Ticket

请求参数

响应参数

请求示例

GET https://{domain_name}/api/v1/cas/p3/serviceValidate?service=https%3A%2F%2Fexample.com%26tenant%3Dxxxxxxxxx&ticket=ST-eYlKs8FrLCltwRwfm8AiwCxmQ8gAL...&format=XML
分享:

    相关文档

    相关产品