···7575 }
76767777 proof := extractProof(headers)
7878-7978 if proof == "" {
8079 return nil, nil
8180 }
···197196198197 nonce, _ := claims["nonce"].(string)
199198 if nonce == "" {
200200- // WARN: this _must_ be `use_dpop_nonce` for clients know they should make another request
199199+ // reference impl checks if self.nonce is not null before returning an error, but we always have a
200200+ // nonce so we do not bother checking
201201 return nil, ErrUseDpopNonce
202202 }
203203204204 if nonce != "" && !dm.nonce.Check(nonce) {
205205- // WARN: this _must_ be `use_dpop_nonce` so that clients will fetch a new nonce
205205+ // dpop nonce mismatch
206206 return nil, ErrUseDpopNonce
207207 }
208208···237237}
238238239239func extractProof(headers http.Header) string {
240240- dpopHeaders := headers["Dpop"]
240240+ dpopHeaders := headers.Values("dpop")
241241 switch len(dpopHeaders) {
242242 case 0:
243243 return ""