Skip to content

兼容E+接口

接口名称接口路径说明E+接口
获取accessToken接口/api/sso/oauth2/token/getAccessToken根据appId secret 获取tokenhttps://ejia.tbea.com/gateway/oauth2/token/getAccessToken
刷新accessToken接口/api/sso/oauth2/token/refreshToken根据appId refreshToken 获取tokenhttps://ejia.tbea.com/gateway/oauth2/token/refreshToken
根据ticket解析用户身份/api/sso/ticket/user/acquirecontext根据ticket解析用户身份https://ejia.tbea.com/gateway/ticket/user/acquirecontext?accessToken=xxxxxx

获取accessToken接口

接口名称url请求方式Content-Type
请求用户授权Token/api/sso/oauth2/token/getAccessTokenpostapplication/json

请求参数

参数名称参数说明是否必填数据类型
appId应用appIdstring
secret应用secretstring
timestamp当前北京时间,Unix格式13位时间戳,精确到毫秒,3分钟内有效。long
scope授权级别String

返回值

json

{
    "code": 200,
    "message": null,
    "data": {
        "ticket": "1122972954242580481",
        "type": "Bearer",
        "token": "xxxxxxx",
        "remeberMe": null,
        "jobNo": null,
        "userType": null,
        "id": "app_xxxxxxx",
        "name": "app_xxxxxxx",
        "username": "app_xxxxxxx",
        "displayName": null,
        "email": null,
        "instId": null,
        "instName": null,
        "passwordLastSetTime": null,
        "passwordSetType": 0,
        "authorities": [
            "ROLE_APP"
        ],
        "refresh_token": "xxxxxxx",
        "expired": 1296000
    }
}

请求示例

curl

curl --location --request POST 'url/api/sso/oauth2/token/getAccessToken' \
--header 'Content-Type: application/json' \
--data-raw '  {
      "appId": "xxx",
      "secret": "xxxx",
      "timestamp": "1747102707279",
      "scope": "app"
  }'

刷新accessToken接口

接口名称url请求方式Content-Type
刷新accessToken接口/api/sso/oauth2/token/refreshTokenpostapplication/json

请求参数

参数名称参数说明是否必填数据类型
appId应用appIdstring
refreshTokentoken刷新令牌,由获取accessToken接口得到的refreshTokenstring
timestamp当前北京时间,Unix格式13位时间戳,精确到毫秒,3分钟内有效。long
scope授权级别String

返回值

json

{
    "code": 200,
    "message": null,
    "data": {
        "ticket": "1122972954242580481",
        "type": "Bearer",
        "token": "xxxxxxx",
        "remeberMe": null,
        "jobNo": null,
        "userType": null,
        "id": "app_xxxxxxx",
        "name": "app_xxxxxxx",
        "username": "app_xxxxxxx",
        "displayName": null,
        "email": null,
        "instId": null,
        "instName": null,
        "passwordLastSetTime": null,
        "passwordSetType": 0,
        "authorities": [
            "ROLE_APP"
        ],
        "refresh_token": "xxxxxxx",
        "expired": 1296000
    }
}

请求示例

curl

curl --location --request POST 'url/api/sso/oauth2/token/refreshToken' \
--data-raw '  {
      "appid": "xxx",
      "refreshToken": "xxx",
      "timestamp": "1747102769283",
      "scope": "app"
  }'

根据ticket解析用户身份

接口名称url请求方式Content-Type
获取用户身份/api/sso/ticket/user/acquirecontext?accessToken=xxxxxxpostapplication/json

请求参数

参数名称参数说明是否必填数据类型
appid应用appId(client_id)string
ticket认证总地址接口根据应用数据拼装成的地址中有ticket参数,ticket时效为很短,不建议开发者缓存使用string

返回值

json

{
    "data": {
        "appid": null,
        "eid": null,
        "openid": null,
        "username": "系统管理员",
        "uid": null,
        "tid": null,
        "userid": null,
        "oid": null,
        "networkid": null,
        "xtid": null,
        "ticket": null,
        "deviceId": null,
        "jobNo": "admin",
        "email": "",
        "orgId": null,
        "mobile": "",
        "photoUrl": null,
        "department": "",
        "longName": null,
        "departOrgName": null,
        "isAdmin": null,
        "account": "admin",
        "projectCode": null
    },
    "success": true,
    "errorCode": 0,
    "error": null
}

请求示例

curl

curl --location --request POST 'url/api/sso/ticket/user/acquirecontext?accessToken=xxxxxx' \
--data-raw '  {
      "appid": "xxx",
      "ticket": "xxx"
  }'