> For the complete documentation index, see [llms.txt](https://docs.decentraland.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.decentraland.org/contributor/contributor-pt/autenticacao/signed-fetch.md).

# Fetch assinado

Quando os clientes do protocolo quiserem fazer solicitações HTTPs autenticadas, podem usar o padrão *signed fetch* mecanismo.

Um signed fetch é uma solicitação que inclui um [serializada em JSON](/contributor/contributor-pt/autenticacao/authchain.md)representado por meio de cabeçalhos. Servidores com APIs compatíveis com Decentraland podem validar identidades antes de, por exemplo, [permitir solicitações de scenes](https://github.com/decentraland/docs/tree/main/runtime/modules/signed_fetch.md) ou criar [adapters](https://github.com/decentraland/docs/tree/main/comms/overview.md).

## Cabeçalhos

As informações de que o servidor precisa para validar a cadeia de autenticação são transmitidas em 3+ cabeçalhos:

* `X-Identity-Timestamp`: o `timestamp` incluído na carga útil assinada (veja abaixo).
* `X-Identity-Metadata`: o `metadata` incluído na carga útil assinada (veja abaixo).
* `X-Identity-AuthChain-<index>`: o [etapa de autenticação serializada em JSON](/contributor/contributor-pt/autenticacao/authchain.md#constructing) `<index>`, começando em `0`.

A cadeia transmitida é validada pelo servidor [conforme especificado](/contributor/contributor-pt/autenticacao/authchain.md).

## Corpo

O corpo da solicitação não é especificado. Os serviços têm total flexibilidade para usar quaisquer protocolos ou formatos que desejarem.

## Carga útil

A cadeia de autenticação [carga útil](/contributor/contributor-pt/autenticacao/authchain.md#constructing) para um signed fetch é uma **string em minúsculas, separada por dois-pontos** que inclui alguns dos elementos da solicitação:

```
<method>:<path>:<timestamp>:<metadata>
```

O `method` e `path` os campos devem corresponder aos da solicitação, e `timestamp` é o mesmo que no `X-Identity-Timestamp` cabeçalho.

O último campo, `metadata`, pode ter conteúdo arbitrário.

Por exemplo:

```
get:/some/path:1682790056:{"some":"custom json"}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.decentraland.org/contributor/contributor-pt/autenticacao/signed-fetch.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
