mirror of
https://github.com/nostr-protocol/nips.git
synced 2025-12-09 00:28:51 +00:00
nip-42 phrasing.
This commit is contained in:
6
42.md
6
42.md
@@ -20,19 +20,19 @@ A relay may want to require clients to authenticate to access restricted resourc
|
|||||||
|
|
||||||
### New client-relay protocol messages
|
### New client-relay protocol messages
|
||||||
|
|
||||||
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 is of the following form:
|
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:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
["AUTH", <challenge-string>]
|
["AUTH", <challenge-string>]
|
||||||
```
|
```
|
||||||
|
|
||||||
And, when sent by clients, of the following form:
|
And, when sent by clients, the following form:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
["AUTH", <signed-event-json>]
|
["AUTH", <signed-event-json>]
|
||||||
```
|
```
|
||||||
|
|
||||||
`AUTH` messages sent by clients should be answered with an `OK` message, like any `EVENT` message.
|
`AUTH` messages sent by clients MUST be answered with an `OK` message, like any `EVENT` message.
|
||||||
|
|
||||||
### Canonical authentication event
|
### Canonical authentication event
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user