Skip to content

Commit

Permalink
add note in README about authentication
Browse files Browse the repository at this point in the history
  • Loading branch information
marler8997 committed Dec 28, 2022
1 parent a88936e commit 1cbdaae
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,17 @@ xtrace -n -- command
# i.e.
xtrace -n -- zig run example.zig
```

# Authentication

https://en.wikipedia.org/wiki/X_Window_authorization

I have yet to implement "cookie-based access". To do so, I need to read the
cookie from `$HOME/.Xauthority` (or the file from environment variable
`XAUTHORITY` if it exists). According to the wiki there are 2 methods
to sending the cookie, `MIT-MAGIC-COOKIE-1` and `XDM-AUTHORIZATION-1`.
In the first method the client simply sends the cookie when requested
to authenticate, in the second method a secret key is also stored in the
`.Xauthority` file, the client creates a string by concatenating the
current time, a transport identifier and the cookie, then encrypts
the resulting string and sends it to the server.

0 comments on commit 1cbdaae

Please sign in to comment.