认证
更新时间:2019-06-14
认证
相对URI | HTTP 方式 |
---|---|
/v1/auth/authenticate/password | POST |
请求参数
名称 | 类型 | 是否必选 | 含义 |
---|---|---|---|
password | String | Y | 身份(principal)的密钥/ak |
username | String | Y | thing的username |
返回参数
名称 | 类型 | 含义 |
---|---|---|
endpointName | String | thing所属的endpoint的Name |
endpointUuid | String | thing所属的endpoint的Uuid |
principalUuid | String | thing在这次认证中所用的principal的uuid |
鉴权
相对URI | HTTP 方式 |
---|---|
/v1/auth/authorize | POST |
请求参数
名称 | 类型 | 是否必选 | 含义 |
---|---|---|---|
principalUuid | String | Y | 需要鉴权的principal的Uuid |
action | ENUM | Y | 动作。目前定义了5个操作(和apollo中对应): CONNECT:主体与broker建立连接 CREATE:主体创建Topic SEND:主体向特定Topic发送message RECEIVE:主体从特定Topic接收message CONSUME: clean session=false时替代receive |
topic | String | N | 这次操作对应的topic。SEND, RECEIVE, CONSUME操作必须要传Topic |
返回参数
无特殊返回参数。