diff options
| author | Alex Gleason <alex@alexgleason.me> | 2026-04-10 13:31:37 -0500 |
|---|---|---|
| committer | Alex Gleason <alex@alexgleason.me> | 2026-04-10 13:31:37 -0500 |
| commit | 5e1e24766910fc07cb61a049aed2623987458ec2 (patch) | |
| tree | b7588f61fddf9374268d5cd6f4e3f2655d7c840a /42.md | |
| parent | b8782df594b4e7e8f088869134908eed58be6078 (diff) | |
| parent | 3465f540e3eaedccb5309711b502f0febf56b52f (diff) | |
Merge nip44-big-payloads into bigger-nip44bigger-nip44
Diffstat (limited to '42.md')
| -rw-r--r-- | 42.md | 6 |
1 files changed, 5 insertions, 1 deletions
| @@ -4,7 +4,7 @@ NIP-42 | |||
| 4 | Authentication of clients to relays | 4 | Authentication of clients to relays |
| 5 | ----------------------------------- | 5 | ----------------------------------- |
| 6 | 6 | ||
| 7 | `draft` `optional` | 7 | `draft` `optional` `relay` |
| 8 | 8 | ||
| 9 | This NIP defines a way for clients to authenticate to relays by signing an ephemeral event. | 9 | This NIP defines a way for clients to authenticate to relays by signing an ephemeral event. |
| 10 | 10 | ||
| @@ -32,6 +32,8 @@ And, when sent by clients, the following form: | |||
| 32 | ["AUTH", <signed-event-json>] | 32 | ["AUTH", <signed-event-json>] |
| 33 | ``` | 33 | ``` |
| 34 | 34 | ||
| 35 | Clients MAY provide signed events from multiple pubkeys in a sequence of `AUTH` messages. Relays MUST treat all pubkeys as authenticated accordingly. | ||
| 36 | |||
| 35 | `AUTH` messages sent by clients MUST be answered with an `OK` message, like any `EVENT` message. | 37 | `AUTH` messages sent by clients MUST be answered with an `OK` message, like any `EVENT` message. |
| 36 | 38 | ||
| 37 | ### Canonical authentication event | 39 | ### Canonical authentication event |
| @@ -69,7 +71,9 @@ relay: ["AUTH", "<challenge>"] | |||
| 69 | client: ["REQ", "sub_1", {"kinds": [4]}] | 71 | client: ["REQ", "sub_1", {"kinds": [4]}] |
| 70 | relay: ["CLOSED", "sub_1", "auth-required: we can't serve DMs to unauthenticated users"] | 72 | relay: ["CLOSED", "sub_1", "auth-required: we can't serve DMs to unauthenticated users"] |
| 71 | client: ["AUTH", {"id": "abcdef...", ...}] | 73 | client: ["AUTH", {"id": "abcdef...", ...}] |
| 74 | client: ["AUTH", {"id": "abcde2...", ...}] | ||
| 72 | relay: ["OK", "abcdef...", true, ""] | 75 | relay: ["OK", "abcdef...", true, ""] |
| 76 | relay: ["OK", "abcde2...", true, ""] | ||
| 73 | client: ["REQ", "sub_1", {"kinds": [4]}] | 77 | client: ["REQ", "sub_1", {"kinds": [4]}] |
| 74 | relay: ["EVENT", "sub_1", {...}] | 78 | relay: ["EVENT", "sub_1", {...}] |
| 75 | relay: ["EVENT", "sub_1", {...}] | 79 | relay: ["EVENT", "sub_1", {...}] |