员工身份(EIAM)

鉴权接口

接口

SSO接口为服务调用接口,调用前需要先调用鉴权接口。

# 请求说明

请求地址 https://{your_domain}/api/v2/tenant/token

请求方式 POST

请求类型 application/x-www-form-urlencoded

# 请求示例

https://{your_domain}/api/v2/tenant/token?grant_type=client_credentials&client_id={client_id}&client_secret={client_secret}

# 请求参数

参数名 中文名称 必须 类型 描述
grant_type 授权类型 String 固定值:client_credentials
client_id 应用id String
client_secret 应用密钥 String

# 返回示例

成功示例:
HTTP/1.1 200 OK
Content-Type: application/json
{
    "access_token": "e665e923-9904",
    "token_type": "bearer",
    "expires_in": 1719,
    "scope": "all",
    "id_token": "eyJraWQiOiJrMSIs.eyJQwWVz_YCkkp9QOrwNYo.ELddR0qhM2jyVUQXgNupYWNtS"
}
1
2
3
4
5
6
7
8
9
10

# 返回参数

参数名 中文名称 类型 描述
access_token 调用接口的令牌 String 调用SSO其他接口时,需要将该值放在请求头中
token_type 令牌类型 String
expires_in 过期时间 Number
scope 权限范围 String
id_token 生成的id_token String