upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/42.md
diff options
context:
space:
mode:
Diffstat (limited to '42.md')
-rw-r--r--42.md6
1 files changed, 5 insertions, 1 deletions
diff --git a/42.md b/42.md
index fdc5d10..c2b6ded 100644
--- a/42.md
+++ b/42.md
@@ -4,7 +4,7 @@ NIP-42
4Authentication of clients to relays 4Authentication of clients to relays
5----------------------------------- 5-----------------------------------
6 6
7`draft` `optional` 7`draft` `optional` `relay`
8 8
9This NIP defines a way for clients to authenticate to relays by signing an ephemeral event. 9This 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
35Clients 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>"]
69client: ["REQ", "sub_1", {"kinds": [4]}] 71client: ["REQ", "sub_1", {"kinds": [4]}]
70relay: ["CLOSED", "sub_1", "auth-required: we can't serve DMs to unauthenticated users"] 72relay: ["CLOSED", "sub_1", "auth-required: we can't serve DMs to unauthenticated users"]
71client: ["AUTH", {"id": "abcdef...", ...}] 73client: ["AUTH", {"id": "abcdef...", ...}]
74client: ["AUTH", {"id": "abcde2...", ...}]
72relay: ["OK", "abcdef...", true, ""] 75relay: ["OK", "abcdef...", true, ""]
76relay: ["OK", "abcde2...", true, ""]
73client: ["REQ", "sub_1", {"kinds": [4]}] 77client: ["REQ", "sub_1", {"kinds": [4]}]
74relay: ["EVENT", "sub_1", {...}] 78relay: ["EVENT", "sub_1", {...}]
75relay: ["EVENT", "sub_1", {...}] 79relay: ["EVENT", "sub_1", {...}]