低空智联网安全管控与服务平台
单点登录跳转
低空智联网安全管控与服务云平台地址:https://www.uavms.uavcmlc.com:30001/pangu/
可测试用户:
账号:xxxxx
密码:xxxxx
步骤一:在管控与服务平台中创建子系统(移动创 建)
配置回调地址(子系统提供,例:https://www.test.com/callback),并得到client\_id,client\_secret
| 参数 | 参数值 |
|---|---|
| client_id | APP_XXXX |
| client_secret | xxxxxxxx |
| redirect_uri | https://www.test.com/callback |
| grant_type | authorization_code |
步骤二:从管控与服务平台页面进入子系统
code:仅能使用一次,
**env:**为请求access_token的环境地址,标识为localhost,
**redirect:**为登录成功后跳转的地址,特殊场景需要
步骤三:根据授权码code去获取access_token
获取成功,代表授权成功。
步骤四:使用access_token 获取用户信息
(如果登录用户与管控与服务平台用户有绑定,需执行此步,固定账号可忽略)
步骤五:子系统执行指定用户的登录
略。
接口说明:
1、根据授权码code获取access_token
请求地址:
localhost/api/ca/oauth/token
请求方式:
GET
请求参数
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
|---|---|---|---|---|---|
| grant_type | 授权类型 | query | true | string | 必填:authorization_code |
| code | 授权码 | query | true | String | 变量 |
| client_id | 客户端id | query | true | string | 当前子系统客户端id |
| client_secret | 客户端密钥 | query | true | string | 当前子系统密钥 |
| redirect_uri | 客户端的授权回调地址 | query | true | string | 当前子系统回调地址(如有特殊字符,需要utf-8编码的urlencode) |
| 响应示例以及参数说明 |
{
"access\_token": "bb9b6f40-e990-4078-8281-cd0403e1a00e", #授权token
"token\_type": "bearer",#
"refresh\_token": "8377144e-f2e5-4d44-b9ff-29ad5e3f3f73",#刷新token
"expires\_in": 84618, #token过期时间
"scope": "all", #授权范围
"USER\_ID": 298, #用户id
"user": { #用户信息,见用户详情
"id": 298,
"account": "blo\*\*\*ain",
"name": "用户名",
"isSystemAdmin": false,
"isCompanyAdmin": true,
"telephone": "152\*\*\*\*\*33",
"email": null,
"orgId": null,
"orgName": null,
"companyId": 92,
"companyName": "公司名称",
"companyIsFrozen": false,
"isFrozen": false,
"isDel": false,
"createAt": 1608018688000,
"updateAt": null,
"realName": null,
"identityType": null,
"identityId": null,
"identityImgFront": null,
"identityImgBack": null,
"avatar": null,
"roles": [
{
"id": 125,
"name": "角色名称",
"code": null,
"desc": null,
"isFrozen": false,
"createAt": 1608018579000
}
],
"lastLoginTime": 1614928291000
},
"COMPANY\_ID": 92 # 公司id
}
2、根据access_token 获取用户详细信息
请求地址:
localhost/api/user/api/uav/user/profile/completeInfo
请求方式:
POST
请求参数
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
|---|---|---|---|---|---|
| access_token | 凭证 | Header | true | string |
响应示例:
{
"code": 0, #返回标识,0,标识正常
"data": {
"id": 445, #用户id
"account": "gistest11", #账号名,可登录
"name": "gistestss", #用户昵称
"isCompanyAdmin": true, #是否是公司
"isDemoUser": null,
"telephone": "14363454535", #手机号
"email": "", #邮箱
"orgId": null,
"orgName": null,
"companyId": 236, #用户所属公司id
"companyName": "我的公司112", #用户所属公司名字
"companyIsFrozen": false, #用户所属公司是否被禁用
"industryCodes": null,
"isIndustryApp": null,
"nature": null,
"isFrozen": false, #用户是否被禁 用
"isDel": false, #用户是否被删除
"createAt": 1654671945000, #用户创建时间
"updateAt": null, #用户更新时间
"realName": null, #用户真实姓名(暂未使用)
"identityType": null, #用户身份类型(暂未使用)
"identityId": null, #用户身份编码(暂未使用)
"identityImgFront": null, #用户身份证件前图片(暂未使用)
"identityImgBack": null, #用户身份证件后图片(暂未使用)
"avatar": null, #用户头像
"roles": [], #用户角色
"lastLoginTime": 1654671945000, #用户最后登录时间
"systemLogo": null,
"systemNames": null,
"childrenCompanyIds": null
},
"msg": "操作成功",
"exception": null
}
-
根据access_token 获取用户公司详细信息
请求地址:
localhost/api/user/api/uav/user/profile/completeCompanyInfo
请求方式:
POST
请求参数
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
|---|---|---|---|---|---|
| access_token | 凭证 | Header | true | string | |
| 响应示例: |
{
"code": 0,
"data": {
"id": 236, #公司id
"pid": null, #上级公司id
"parentName": null, #上级公司名称
"companyName": "我的公司112", #当前公司名称
"desc": null,
"isFrozen": false, #当前公司是否被禁用
"createAt": 1654671943000, #当前公司创建时间
"unifiedCreditCode": "weqwe1", #当前公司社会信用代码
"unifiedCreditImgs": [
""
],
"userId": 445, #当前公司管理员id
"name": "gistestss", #当前公司管理员名称
"account": "gistest11", #当前公司管理员登录账号
"nature": "NORMAL", #当前公司性质
"telephone": "14363454535", #当前公司管 理员手机号
"email": "", #当前公司管理员邮箱
"identityId": null,
"identityImgFront": null,
"identityImgBack": null,
"lastLoginTime": null,
"systemLogo": "\_\_justDefault",
"systemNames": [
{
"lang": "zh\_CN",
"value": "低空智联网安全管控与服务平台"
},
{
"lang": "zh\_TW",
"value": "低空智聯網安全管控與服務平台"
},
{
"lang": "en\_US",
"value": "Low altitude Zhilian network security management and control and service platform"
}
],
"langs": [
"zh\_CN"
],
"isIndustryApp": false,
"gisInfoVO": { #当前公司地理位置信息
"lat": "30.695558", #当前公司纬度
"lng": "104.773447", #当前公司经度
"zoom": 5, #当前公司地图缩放比
"additional": { #当前公司其他参数
"age": "12"
}
},
"province": "四川省", #当前公司所在省
"city": "成都市", #当前公司所在市
"district": "金堂县", #当前公司所在区县
"address": "四川省成都市金堂县转龙镇龙神屋基" #当前公司所在地址信息
},
"msg": "操作成功",
"exception": null
}