Expand description
The Tokens tab (doc 34, section 6.5): the tokens of the server, creating, editing, cloning and revoking them.
This file is the state and the keys; view.rs draws it. The secret of a new token never leaves the popup that
shows it (TUI-TOK-03).
Modules§
- view
- The drawing of the Tokens tab: the table of tokens and the detail of the selected one.
Structs§
- BadExpiry
- The text typed as an expiry is not one of the forms
parse_expiryreads.
Enums§
- Availability
- What the tab can do with this token and this server.
Constants§
- MASK_
AFTER_ MS - After this long the secret on the screen is masked (TUI-TOK-03), in milliseconds.
- MAX_
PAGES - How many pages of tokens one read follows before it gives up (200 tokens each).
- PERMISSIONS
- The permissions a token can have, in the order the form lists them.
- SOON_
DAYS - A token that expires within this many days is shown in yellow (TUI-TOK-01).
Functions§
- availability
- editor_
key - The keys of the form of a token.
- gate
- Why an action cannot run now, as a catalog key;
Nonemeans it can (TUI-FRM-10). - on_
action - parse_
expiry - What a person types as an expiry: nothing,
noneornever(no deadline), a time from now (90m,12h,30d), a date (2027-01-31, the start of that day in UTC) or a full RFC 3339 instant.Ok(None)is no deadline. - refused
- The server refused the form: the reason goes in the form, which stays open (TUI-TOK-02).
- revoked
- A token was revoked.
- rfc3339
2026-10-15T12:00:00Zfor a time in milliseconds since the epoch.- saved
- The server answered the form: the secret of a new token, or the change of a token.
- secret_
file - The file
swrites the secret to: in the folder the interface was opened from. - secret_
key - A key in the popup of the secret (TUI-TOK-03).
- secret_
written - The secret was written to a file: it counts as kept.
- selected
- selected_
index - The index of the selected token in
tokens; the first one if the selection is gone. - submit
- The form was filled in and the person asked to save it.
- visible
- The tokens shown: those whose name has the filter in it, in the chosen order.