From 074785cea106179cb3305637055ab0a009ca74f2 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:52 -0500 Subject: initial commit --- .../web/http/headers/authorization/index.html | 94 ++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 files/pt-br/web/http/headers/authorization/index.html (limited to 'files/pt-br/web/http/headers/authorization/index.html') diff --git a/files/pt-br/web/http/headers/authorization/index.html b/files/pt-br/web/http/headers/authorization/index.html new file mode 100644 index 0000000000..018c335175 --- /dev/null +++ b/files/pt-br/web/http/headers/authorization/index.html @@ -0,0 +1,94 @@ +--- +title: Authorization +slug: Web/HTTP/Headers/Authorization +tags: + - Autenticação + - Cabeçalho HTTP + - Cabeçalho de requisição + - HTTP + - Reference + - Referencia + - cabeçalho +translation_of: Web/HTTP/Headers/Authorization +--- +
{{HTTPSidebar}}
+ +

O cabeçalho de requisição HTTP Authorization contém as credenciais para autenticar o agente de usuário com o servidor, geralmente o servidor responderá com um status {{HTTPStatus("401")}} Unauthorized se não for possível fazer a autenticação, e com o cabeçalho {{HTTPHeader("WWW-Authenticate")}}.

+ + + + + + + + + + + + +
Tipo de cabeçalho{{Glossary("Request header")}}
{{Glossary("Forbidden header name")}}não
+ +

Sintaxe

+ +
Authorization: <tipo> <credenciais>
+ +

Directives

+ +
+
<tipo>
+
Tipo de autenticação. Um tipo comum é o "Basic". Outros tipos: + +
+
<credenciais>
+
Se a autenticação "Basic" é utilizada, as credenciais construção são parecidas com isto: +
    +
  • O nome de usuário com a senha combinados por dois pontos (aladdin:opensesame).
  • +
  • A cadeia de caracteres resultante é uma codificação base64 (YWxhZGRpbjpvcGVuc2VzYW1l).
  • +
+ +
+

Nota: Codificação Base64 não significa encriptação ou hashing! Esse método é igualmente seguro como mandar em texto limpo (base64 é uma codificação que pode ser revertida). Use o HTTPS em conjunto com a Autenticação Basic.

+
+
+
+ +

Exemplos

+ +
Authorization: Basic YWxhZGRpbjpvcGVuc2VzYW1l
+
+ +

Veja também autenticação HTTP para exemplos em como configurar os servidores Apache ou nginx para proteger seu site com autenticação básica HTTP.

+ +

Especificações

+ + + + + + + + + + + + + + + + + + +
EspecificaçãoTítulo
{{RFC("7235", "Authorization", "4.2")}}HTTP/1.1: Authentication
{{RFC("7617")}}O esquema de autenticação HTTP 'Basic'
+ +

Veja também

+ + -- cgit v1.2.3-54-g00ecf