做简易动画的网站,网站空间免备案,重庆建网,php网站建设有关知识一、官方流程说明 二、官方流程解析
1 : 发起方向接收方发送注册 HTTP POST 请求/VIID/System/Register。 2: 接收方向发送方发送响应401 Unauthorized, 并在响应的消息头 WWW-Authenticate 字段中给 出适合发送方的认证机制和参数。 3: 发起方重新向接收方发送注册 HTTP POST…一、官方流程说明 二、官方流程解析
1 : 发起方向接收方发送注册 HTTP POST 请求/VIID/System/Register。 2: 接收方向发送方发送响应401 Unauthorized, 并在响应的消息头 WWW-Authenticate 字段中给 出适合发送方的认证机制和参数。 3: 发起方重新向接收方发送注册 HTTP POST 请求, 在请求的 Authorization 字段给出信任书, 包 含认证信息。 4: 接收方对请求进行验证, 如果发起方身份合法, 向发起方发送成功响应200 OK, 如果身份不合 法则发送拒绝服务应答。
三、Regist消息解析 wireshark抓包分析
HTTP消息头Post消息消息体Json 消息内容文本话
[POST /VIID/System/Register HTTP/1.1 Host: 10.0.21.166:1400 Content-Type: application/VIIDJSON; charsetUTF-8 Accept: */* User-Agent: Vision-Zenith, ChengDu Accept-Encoding: gzip, deflate Cache-Control: no-cache Content-Length: 54
{RegisterObject:{DeviceID:34078100001190001002}} 四、Regist消息回复未认证 文本化
HTTP/1.1 401 Unauthorized Content-Type: text/plain WWW-Authenticate: Digest realm12312312315031231231, noncezWq5D1nFFUa71Ni9, opaqueBSTjT6owVLrnu4k, algorithmMD5, qopauth Date: Tue, 04 Jun 2024 01:45:47 GMT Content-Length: 17
401 Unauthorized
五、认证再次注册 文本化
POST /VIID/System/Register HTTP/1.1 Host: 10.0.21.166:1400 Content-Type: application/VIIDJSON; charsetUTF-8 Authorization: Digest username34078100001190001002, realm12312312315031231231, noncezWq5D1nFFUa71Ni9, uri/VIID/System/Register, algorithmMD5, qopauth, nc00000001, cnonce0a4f113b, response72ad0bd84ec2ff10acf0c310b3beab16, opaqueBSTjT6owVLrnu4k Accept: */* User-Agent: Vision-Zenith, ChengDu Accept-Encoding: gzip, deflate Cache-Control: no-cache Content-Length: 54
{RegisterObject:{DeviceID:34078100001190001002}}
六、注册成功返回
官方定义 wireshark抓包 文本化
HTTP/1.1 200 OK Content-Type: application/json; charsetutf-8 Date: Tue, 04 Jun 2024 01:46:02 GMT Content-Length: 153
{
ResponseStatusObject:{
Id:34078100001190001002,
StatusCode:0,
RequestURL:/VIID/System/Register,
StatusString:,
LocalTime:20240604094602
}}