Skip to content

NUT-22: add in-band WebSocket authentication - #413

Open
crodas wants to merge 1 commit into
cashubtc:mainfrom
crodas:nut-22-add-support-websocket
Open

NUT-22: add in-band WebSocket authentication#413
crodas wants to merge 1 commit into
cashubtc:mainfrom
crodas:nut-22-add-support-websocket

Conversation

@crodas

@crodas crodas commented Jul 27, 2026

Copy link
Copy Markdown

Here is the rendered document

Browsers cannot set the Blind-auth header on the WebSocket API, so a browser wallet has no way to authenticate a protected NUT-17 /v1/ws endpoint at upgrade time. Accept the BAT in-band instead: extend the NUT-17 WsRequestMethod enum with an authenticate command that carries the serialized BAT, spend it once, and authenticate the connection for its lifetime. Define the reject/timeout behavior and error codes for unauthenticated connections.

Browsers cannot set the Blind-auth header on the WebSocket API, so a browser
wallet has no way to authenticate a protected NUT-17 /v1/ws endpoint at upgrade
time. Accept the BAT in-band instead: extend the NUT-17 WsRequestMethod enum
with an authenticate command that carries the serialized BAT, spend it once,
and authenticate the connection for its lifetime. Define the reject/timeout
behavior and error codes for unauthenticated connections.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Backlog

Development

Successfully merging this pull request may close these issues.

1 participant