Get Session Information

登录EnOS后,获取当前登录的会话信息。

请求格式

POST https://{apigw-address}/enos-iam-service/v2.0/session/info

响应参数

名称

数据类型

描述

session

List<JSONObject>

会话信息。详见 Session结构体>>

错误码

代码

描述

30401

提供的Bearer token无效

30404

未找到会话信息

错误码返回message(供参考)

* 30401: authenticated
* 30404: User login session expired; Organization does not exist

示例

请求示例

url: https://{apigw-address}/enos-iam-service/v2.0/session/info

method: POST

headers: {
        "Authorization": "yourBearerToken"
        }

返回示例

{
  "fail": false,
  "session": {
    "workingOrganization": {
      "domain": "db_portal",
      "name": "portal",
      "id": "orgId"
    },
    "expires": 7200,
    "createTime": 1562849746,
    "residentOrganization": {
      "domain": null,
      "name": "portal",
      "id": "orgId"
    },
    "refreshTime": 1562850052,
    "id": "IAM_S_HbH8y6sP77T5uUDgqLfzGCZkrz9x5Pyr3VMVARBBQRK8YDbAnsU9YWdUQAMkBu7g4fQKUXmPjakeSmqpFVWsANXKdrBJKUxrLxZC9MvCVHqTc5HyqTcnANz3M8HMhnTb",
    "user": {
      "guestOrganizations": null,
      "createdByUserId": "u1544xxxxxxxxxx",
      "resourceId": "r15578227990212",
      "phoneVerified": false,
      "description": "",
      "type": 2,
      "organizationId": "orgId",
      "createdAt": null,
      "emailVerified": true,
      "phoneVerifiedAt": null,
      "phone": "",
      "createTime": "2019-05-14 08:33:19.0",
      "emailVerifiedAt": null,
      "mfaType": null,
      "password_strength": "MEDIUM",
      "password_state": 0.0,
      "password_expire_time": 1.601192046E12,
      "extra": null,
      "organization": null,
      "name": "portal",
      "phoneArea": "",
      "id": "u1557xxxxxxxxxx",
      "state": 0,
      "authType": 0,
      "email": "user@mail.com"
    }
  },
  "success": true,
  "requestId": null,
  "failed": false,
  "message": "",
  "status": 0,
  "successful": true
}