NIP-86: improve Authorization section, link to NIP-98

This commit is contained in:
Alex Gleason 2024-07-16 12:56:52 -05:00 committed by GitHub
parent 383adc2b95
commit 58c61ed745
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

4
86.md
View File

@ -85,4 +85,6 @@ This is the list of **methods** that may be supported:
### Authorization
The request must contain an `Authorization` header with the value set to `Nostr <base64(auth-event)>` in which `<auth-event>` is an event of kind `27235` with a tag `["host", <hostname-of-target-relay>]`, a tag `["payload", <sha256-hash-of-the-request-body-as-lowercase-hex>]` and `created_at` set to the current timestamp.
The request must contain an `Authorization` header with a valid [NIP-98](./98.md) event, except the `payload` tag is required. The `u` tag is the relay URL.
If `Authorization` is not provided or is invalid, the endpoint should return a 401 response.