v0.2.0 271e247

auth.go RawHistoryFolder

1package ports
2
3// Auth messages are private visual↔worker traffic, never policy-daemon events.
4const (
5	AuthMaxSecret   = 512
6	AuthMaxMetadata = 4096
7)
8
9type AuthKind uint8
10
11const (
12	AuthReady AuthKind = iota + 1
13	AuthAttempt
14	AuthPrompt
15	AuthSecret
16	AuthStatus
17	AuthResult
18	AuthCancel
19)
20
21type AuthCode uint8
22
23const (
24	AuthPassword AuthCode = iota + 1
25	AuthPIN
26	AuthUnavailable
27	AuthDenied
28	AuthSuccess
29	AuthInvalid
30	// AuthFallbackPassword means a selected PIN source was unavailable or
31	// invalid and the visual must ask for an account password instead.
32	AuthFallbackPassword
33)
34
35type AuthFallback uint8
36
37const AuthFallbackToPassword AuthFallback = 1
38
39// Payload ownership transfers to the recipient, which must clear secrets.
40// Every frame is scoped to a nonzero lock epoch. Ready alone uses attempt 0.
41// Ready has no payload except AuthUnavailable may carry exactly one byte
42// AuthFallbackToPassword when fallback was required but PAM is unavailable.
43// Attempt/Secret have code 0 and bounded secret bytes. All other kinds have
44// no payload; Prompt/Status use AuthPassword, Result uses success/denied/
45// unavailable/invalid, Cancel uses AuthInvalid. Non-Ready attempts are nonzero.
46type AuthFrame struct {
47	Kind       AuthKind
48	Code       AuthCode
49	Generation uint64
50	Attempt    uint64
51	Payload    []byte
52}
53
54// AuthBootstrap is delivered on a private anonymous pipe once per lock.
55// EnvPIN is the privately captured startup environment value, never a lookup
56// of the authentication worker's environment. Run consumes and wipes it.
57type AuthBootstrap struct {
58	Generation   uint64
59	PINSource    PINSource
60	PINReference string
61	EnvPIN       []byte
62}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 2

Tags 9

↑↓ moveenter openesc close