diff options
Diffstat (limited to '42.md')
| -rw-r--r-- | 42.md | 8 |
1 files changed, 4 insertions, 4 deletions
| @@ -22,13 +22,13 @@ A relay may want to require clients to authenticate to access restricted resourc | |||
| 22 | 22 | ||
| 23 | This NIP defines a new message, `AUTH`, which relays CAN send when they support authentication and clients can send to relays when they want to authenticate. When sent by relays the message has the following form: | 23 | This NIP defines a new message, `AUTH`, which relays CAN send when they support authentication and clients can send to relays when they want to authenticate. When sent by relays the message has the following form: |
| 24 | 24 | ||
| 25 | ```json | 25 | ``` |
| 26 | ["AUTH", <challenge-string>] | 26 | ["AUTH", <challenge-string>] |
| 27 | ``` | 27 | ``` |
| 28 | 28 | ||
| 29 | And, when sent by clients, the following form: | 29 | And, when sent by clients, the following form: |
| 30 | 30 | ||
| 31 | ```json | 31 | ``` |
| 32 | ["AUTH", <signed-event-json>] | 32 | ["AUTH", <signed-event-json>] |
| 33 | ``` | 33 | ``` |
| 34 | 34 | ||
| @@ -38,14 +38,14 @@ And, when sent by clients, the following form: | |||
| 38 | 38 | ||
| 39 | The signed event is an ephemeral event not meant to be published or queried, it must be of `kind: 22242` and it should have at least two tags, one for the relay URL and one for the challenge string as received from the relay. Relays MUST exclude `kind: 22242` events from being broadcasted to any client. `created_at` should be the current time. Example: | 39 | The signed event is an ephemeral event not meant to be published or queried, it must be of `kind: 22242` and it should have at least two tags, one for the relay URL and one for the challenge string as received from the relay. Relays MUST exclude `kind: 22242` events from being broadcasted to any client. `created_at` should be the current time. Example: |
| 40 | 40 | ||
| 41 | ```json | 41 | ```jsonc |
| 42 | { | 42 | { |
| 43 | "kind": 22242, | 43 | "kind": 22242, |
| 44 | "tags": [ | 44 | "tags": [ |
| 45 | ["relay", "wss://relay.example.com/"], | 45 | ["relay", "wss://relay.example.com/"], |
| 46 | ["challenge", "challengestringhere"] | 46 | ["challenge", "challengestringhere"] |
| 47 | ], | 47 | ], |
| 48 | ... | 48 | // other fields... |
| 49 | } | 49 | } |
| 50 | ``` | 50 | ``` |
| 51 | 51 | ||