aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/http/headers/proxy-authenticate/index.html
blob: 64a46c2674570ad94a50e2b3a9a4946ded1520ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
---
title: Proxy-Authenticate
slug: Web/HTTP/Headers/Proxy-Authenticate
tags:
  - 代理
  - 响应首部
  - 首部
translation_of: Web/HTTP/Headers/Proxy-Authenticate
---
<div>{{HTTPSidebar}}</div>

<p>The HTTP <strong><code>Proxy-Authenticate</code></strong> 是一个响应首部,指定了获取 {{Glossary("proxy server")}} (代理服务器)上的资源访问权限而采用的身份验证方式。代理服务器对请求进行验证,以便它进一步传递请求。</p>

<p><code>Proxy-Authenticate </code>首部需要与 {{HTTPStatus("407")}} <code>Proxy Authentication Required 响应一起发送。</code></p>

<table class="properties">
 <tbody>
  <tr>
   <th scope="row">Header type</th>
   <td>{{Glossary("Response header")}}</td>
  </tr>
  <tr>
   <th scope="row">{{Glossary("Forbidden header name")}}</th>
   <td>no</td>
  </tr>
 </tbody>
</table>

<h2 id="语法">语法</h2>

<pre class="syntaxbox">Proxy-Authenticate: &lt;type&gt; realm=&lt;realm&gt;
</pre>

<h2 id="指令">指令</h2>

<dl>
 <dt>&lt;type&gt;</dt>
 <dd><a href="/en-US/docs/Web/HTTP/Authentication#Authentication_schemes">身份验证类型</a>。一个常见的类型是 <a href="/en-US/docs/Web/HTTP/Authentication#Basic_authentication_scheme">"基本验证"。</a>IANA 机构维护了 <a href="http://www.iana.org/assignments/http-authschemes/http-authschemes.xhtml">一系列的身份验证机制</a></dd>
 <dt>realm=&lt;realm&gt;</dt>
 <dd>对于被保护区域(即安全域)的描述。如果没有指定安全域,客户端通常用一个格式化的主机名来代替。</dd>
</dl>

<h2 id="示例">示例</h2>

<pre>Proxy-Authenticate: Basic

Proxy-Authenticate: Basic realm="Access to the internal site"
</pre>

<h2 id="规范">规范</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">Specification</th>
   <th scope="col">Title</th>
  </tr>
  <tr>
   <td>{{RFC("7235", "Proxy-Authenticate", "4.3")}}</td>
   <td>HTTP/1.1: Authentication</td>
  </tr>
  <tr>
   <td>{{RFC("7617")}}</td>
   <td>The 'Basic' HTTP Authentication Scheme</td>
  </tr>
 </tbody>
</table>

<h2 id="相关内容">相关内容</h2>

<ul>
 <li><a href="/en-US/docs/Web/HTTP/Authentication">HTTP authentication</a></li>
 <li>{{HTTPHeader("Authorization")}}</li>
 <li>{{HTTPHeader("Proxy-Authorization")}}</li>
 <li>{{HTTPHeader("WWW-Authenticate")}}</li>
 <li>{{HTTPStatus("401")}}, {{HTTPStatus("403")}}, {{HTTPStatus("407")}}</li>
</ul>