autounlock

package
v0.0.0-...-2db35d6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2024 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (

	/*
		ContentLocationMagic is a rather randomly typed string that is sent as Content-Location header value when a
		client successfully reaches the password unlock URL (and only that URL). Clients may look for this magic
		in order to know that the URL reached indeed belongs to a laitos password input web server.
	*/
	ContentLocationMagic = "vmseuijt5oj4d5x7fygfqj4398"
	// PasswordInputName is the HTML element name that accepts password input.
	PasswordInputName = "password"
)

Variables

This section is empty.

Functions

func TestAutoUnlock

func TestAutoUnlock(daemon *Daemon, t testingstub.T)

Types

type Daemon

type Daemon struct {
	URLAndPassword map[string]string `json:"URLAndPassword"` // URLAndPassword is a mapping between URL and corresponding password.
	IntervalSec    int               `json:"IntervalSec"`    // IntervalSec is the interval at which URLs are checked.
	// contains filtered or unexported fields
}

Daemon periodically probes URLs where laitos password input servers ("passwdserver") are located in order to unlock their program data, and submits stored passwords to those laitos URLs to unlock their data.

func (*Daemon) Initialise

func (daemon *Daemon) Initialise() error

func (*Daemon) StartAndBlock

func (daemon *Daemon) StartAndBlock() error

StartAndBlock starts the loop that probes URLs.

func (*Daemon) Stop

func (daemon *Daemon) Stop()

Stop previously started daemon loop.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL