#[non_exhaustive]pub enum AccountReply {
Show 23 variants
Salt {
salt: Vec<u8>,
},
SignedUp,
LoggedIn {
token: String,
public_keys: Vec<u8>,
wrapped_keys: Vec<u8>,
device: String,
sealed_keys: Vec<u8>,
},
PairingPending {
request: String,
device: String,
expires: i64,
},
Devices {
devices: Vec<DeviceInfo>,
now: i64,
},
DeviceApproved {
approved: bool,
},
DeviceRemoved {
removed: bool,
},
DeviceRenamed,
RecoveryCodesSet,
Reauthed {
until: i64,
},
LoggedOut,
TokenCreated,
Tokens {
tokens: Vec<TokenInfo>,
now: i64,
},
TokenRevoked {
revoked: bool,
},
AccountKeys {
public_keys: Vec<u8>,
},
Registered {
machine: String,
},
Machines {
machines: Vec<MachineInfo>,
},
MachineRemoved {
removed: bool,
},
MachineApproved {
approved: bool,
},
Sessions {
machines: Vec<MachineSessions>,
limits: Option<AccountLimits>,
},
PasswordChanged {
token: String,
},
KeysRotated {
token: String,
},
Refused {
reason: String,
},
}Expand description
The relay’s reply to an AccountRequest.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Salt
The salt asked for.
SignedUp
The account was made.
LoggedIn
Logged in: a token for the relay, and the account’s keys, the private ones still wrapped.
Fields
sealed_keys: Vec<u8>After a pairing (#154): the account’s private keys, sealed to the
device by the device that approved it (device_keys_info);
after a recovery, the keys the recovery code wraps. Empty
otherwise.
PairingPending
The login waits for an approved device’s approval (#154).
Fields
request: StringThe secret to ask with (AccountRequest::PairingPoll); empty
in the answer to a poll.
Devices
The account’s devices (#154).
Fields
devices: Vec<DeviceInfo>The devices, oldest first.
DeviceApproved
Whether a waiting device was approved (false: none such waits).
DeviceRemoved
Whether a device was removed (false: no such device).
DeviceRenamed
The device was named.
RecoveryCodesSet
The recovery codes were replaced.
Reauthed
The password was proven again: sensitive requests work until
until (Unix seconds).
LoggedOut
The login session ended (or there was none).
TokenCreated
The registration token was made.
Tokens
The account’s registration tokens, oldest first.
Fields
TokenRevoked
Whether a registration token was revoked (false: no such token).
AccountKeys
The public keys of a registration token’s account.
Registered
The machine is registered.
Machines
The account’s machines.
Fields
machines: Vec<MachineInfo>The machines.
MachineRemoved
Whether a machine was removed (false: no such machine).
MachineApproved
Whether a machine was approved (false: no such machine).
Sessions
The account’s machines and their sessions.
Fields
machines: Vec<MachineSessions>The machines.
limits: Option<AccountLimits>The account’s limits on this relay (#104); None from a relay
older than them.
PasswordChanged
The password was changed: the new login (every other ended).
KeysRotated
The keys were replaced: the new login (every other ended).
Refused
Refused, and why. A failed login says only that the name or the password is wrong, never which.