--- title: WWW-Authenticate slug: Web/HTTP/Headers/WWW-Authenticate translation_of: Web/HTTP/Headers/WWW-Authenticate ---
La cabezera de la respuesta HTTP WWW-Authenticate
define el método de autentificación que debe ser utilizado para acceder al recurso solicitado.
La cabezera WWW-Authenticate
es enviada junto al estado {{HTTPStatus("401")}} Unauthorized
en la respuesta.
Header type | {{Glossary("Response header")}} |
---|---|
{{Glossary("Forbidden header name")}} | no |
WWW-Authenticate: <type> realm=<realm>
Typically, a server response contains a WWW-Authenticate
header that looks like these:
WWW-Authenticate: Basic WWW-Authenticate: Basic realm="Access to the staging site", charset="UTF-8"
See also HTTP authentication for examples on how to configure Apache or nginx servers to password protect your site with HTTP basic authentication.
Specification | Title |
---|---|
{{RFC("7235", "WWW-Authenticate", "4.1")}} | HTTP/1.1: Authentication |
{{RFC("7617")}} | The 'Basic' HTTP Authentication Scheme |
{{Compat("http.headers.WWW-Authenticate")}}