blob: d3456d4258cba3d3e2de1ecbbf12bb2f2d5f2424 (
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
78
79
80
81
82
83
84
85
86
87
|
---
title: WWW-Authenticate
slug: Web/HTTP/Headers/WWW-Authenticate
translation_of: Web/HTTP/Headers/WWW-Authenticate
---
<div>{{HTTPSidebar}}</div>
<p>La cabezera de la respuesta HTTP <strong><code>WWW-Authenticate</code></strong> define el método de autentificación que debe ser utilizado para acceder al recurso solicitado.</p>
<p>La cabezera <code>WWW-Authenticate</code> es enviada junto al estado {{HTTPStatus("401")}} <code>Unauthorized</code> en la respuesta.</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="Syntax">Syntax</h2>
<pre class="syntaxbox notranslate">WWW-Authenticate: <type> realm=<realm>
</pre>
<h2 id="Directives">Directives</h2>
<dl>
<dt><type></dt>
<dd><a href="/en-US/docs/Web/HTTP/Authentication#Authentication_schemes">Tipo de autentificación</a>. Un tipo común es <a href="/en-US/docs/Web/HTTP/Authentication#Basic_authentication_scheme">"Basic"</a>. IANA mantiene una <a href="http://www.iana.org/assignments/http-authschemes/http-authschemes.xhtml">lista de los esquemas de autentificación</a>.</dd>
<dt>realm=<realm></dt>
<dd>Una descripción del recurso protegido. Si el realm no es especificado, los clientes a menudo muestran el hostname.</dd>
<dt>charset=<charset></dt>
<dd>Le indica al cliente el tipo de encoding scheme preferido por el servidor cuando se envía un nombre de usuario y contraseña. El único valor permitido es la cadena de texto (no diferencia entre mayúsculas o mínusculas) "UTF-8". Esto no esta relacionado a el encoding del parámetro realm.</dd>
</dl>
<h2 id="Examples">Examples</h2>
<p>Typically, a server response contains a <code>WWW-Authenticate</code> header that looks like these:</p>
<pre class="notranslate">WWW-Authenticate: Basic
WWW-Authenticate: Basic realm="Access to the staging site", charset="UTF-8"
</pre>
<p>See also <a href="/en-US/docs/Web/HTTP/Authentication">HTTP authentication</a> for examples on how to configure Apache or nginx servers to password protect your site with HTTP basic authentication.</p>
<h2 id="Specifications">Specifications</h2>
<table class="standard-table">
<thead>
<tr>
<th scope="col">Specification</th>
<th scope="col">Title</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{RFC("7235", "WWW-Authenticate", "4.1")}}</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="Browser_compatibility">Browser compatibility</h2>
<p>{{Compat("http.headers.WWW-Authenticate")}}</p>
<h2 id="See_also">See also</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("Proxy-Authenticate")}}</li>
<li>{{HTTPStatus("401")}}, {{HTTPStatus("403")}}, {{HTTPStatus("407")}}</li>
</ul>
|