Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

introduce relay client session identifier #125

Open
wants to merge 2 commits into
base: main-lfs-DO-NOT-USE
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion docs/specs/clients/core/relay/relay-client-auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,21 @@ Client authentication is described with a did-jwt using the following claims:

`aud` - relay server URL

`sub` - random nonce (unique per connection)
`sub` - random session identifier

`act` - description of action intent. Must be equal to "client_auth"

### Relay Session

A Relay session is defined by the following lifecycle conditions:

* Session initializes when the app loads for the first time
* Session terminates when the app is closed or terminated
* Session is persisted when switching between foreground and background
* Session is unique per each tab instance (specific for web browsers)

A Relay session identifier should be:

* Persisted through the whole session lifecycle
* Re-used whenever the websocket reconnects
* Formatted as 32 byte hex string