【发布时间】:2018-07-09 22:42:47
【问题描述】:
我正在使用 Digest Authentication 来检查用户是否知道服务器的 ID 和 PW。一旦客户端因为知道凭据而进入服务器(服务器已将其哈希响应与客户端的哈希响应匹配),他的所有请求都具有授权标头。这是正常的吗?授权头不是只发送一次吗?
一旦客户端通过了摘要挑战,他的所有请求都如下所示(所有请求都有 Authorization 标头):
GET /XMLAliasRegDev HTTP/1.1
***Here's the Host***
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0
Accept: */*
Accept-Language: es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Referer: http://Here's the Host/webpage/html/registry.htm
Authorization: Digest username="xxx", realm="xxx", nonce="b463d286b77fba6535adc1902e43377a", uri="/XMLAliasRegDev", response="4bedc10d3fd7f3fb90ab518ffead238b", opaque="eb2cdfdb6ebd0e78c0737bc4d58d0d3c"
Connection: keep-alive
GET /webpage/scripts/regjs.js HTTP/1.1
***Here's the Host***
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:61.0) Gecko/20100101 Firefox/61.0
Accept: */*
Accept-Language: es-ES,es;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Referer: http://Here's the Host/webpage/html/registry.htm
Authorization: Digest username="xxx", realm="xxx", nonce="b463d286b77fba6535adc1902e43377a", uri="/webpage/scripts/regjs.js", response="95cd7035c6abf7666fbdb0068aa69b9a", opaque="eb2cdfdb6ebd0e78c0737bc4d58d0d3c"
Connection: keep-alive
如果服务器已经匹配响应并且服务器正在向客户端发送资源,为什么客户端要发送授权标头? 泰!
PS:我使用 Arduino 作为服务器。
【问题讨论】:
标签: http digest-authentication