V2EX  ›  英汉词典

WWW-Authenticate

定义 / Definition

WWW-Authenticate 是一个 HTTP 响应头(response header),服务器在返回 401 Unauthorized(未授权) 时用它来告知客户端:需要使用哪种认证方案(如 Basic、Bearer、Digest),以及相关参数(如 realm、scope、charset 等)。常见于受保护资源的访问与 API 鉴权流程中。

发音 / Pronunciation (IPA)

/ˌdʌbəl.juː ˌdʌbəl.juː ˌdʌbəl.juː ɔːˈθentɪkeɪt/

例句 / Examples

The server replied with a 401 and a WWW-Authenticate header.
服务器返回了 401,并带有 WWW-Authenticate 响应头。

If the API returns WWW-Authenticate: Bearer realm="example", error="invalid_token", the client should refresh the token and retry the request.
如果 API 返回 WWW-Authenticate: Bearer realm="example", error="invalid_token",客户端应刷新令牌并重试请求。

词源 / Etymology

该术语来自万维网早期的 HTTP 规范命名方式:WWW- 表示与 Web(World Wide Web)相关的头字段,Authenticate 源自动词 authenticate(“验证真伪/确认身份”),其词根可追溯到表示“权威、真实”的古希腊语来源,经由拉丁语、法语进入英语。在 HTTP 中,它专指“要求并说明认证方式”的提示信息。

相关词 / Related Words

文学与经典出处 / Notable Works

  • RFC 7235 — Hypertext Transfer Protocol (HTTP/1.1): Authentication(定义与规范化 WWW-Authenticate 与认证挑战机制)
  • RFC 2617 — HTTP Authentication: Basic and Digest Access Authentication(早期对 Basic/Digest 及相关头字段的经典规范)
  • RFC 6750 — The OAuth 2.0 Authorization Framework: Bearer Token Usage(规定 Bearer 令牌相关错误如何通过 WWW-Authenticate 表达)
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   5337 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 15ms · UTC 01:20 · PVG 09:20 · LAX 18:20 · JFK 21:20
♥ Do have faith in what you're doing.