Documentation
¶
Overview ¶
Package handoff gives a browser a URL that carries an access token without putting the token on a command line.
The local pages of `remohop web`, quick support and the desktop viewer are reached through URLs that contain an access token. The argument list of the program that opens a browser (xdg-open, open, the browser itself) can be read by every local user on Unix, so the browser is pointed at a private file (mode 0600 in a 0700 directory) that only redirects to the URL, and the file is removed soon after.
The file must be somewhere the browser can read. Browsers packaged as a Snap or a Flatpak (Firefox and Chromium on Ubuntu are Snaps) run in a sandbox that cannot read hidden directories under the home directory, such as ~/.config, where RemoHop keeps its state. For those, the file goes into the sandbox's own private directory instead (see Dir).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Dir ¶
Dir is the directory for a handoff file that browser will open. browser is the path of the browser program, or empty for the user's default browser (opened through xdg-open, open or the shell). It is the RemoHop run directory, except for sandboxed (Snap or Flatpak) browsers on Linux, which get a directory inside their sandbox.
REMOHOP_HANDOFF_DIR overrides the choice (for unusual sandboxes, and for tests that must not look at the real desktop's browser).
Types ¶
This section is empty.