Enum AccountResponse
pub enum AccountResponse {
TenantCreated {
tenant_id: String,
api_key: String,
},
UserCreated {
username: String,
},
SignedIn {
username: String,
token: String,
},
SignupRefused {
reason: SignupReason,
},
SignInRefused,
UnknownTenant,
ServerError,
RateLimited,
}Expand description
The account service’s response.
Variants§
TenantCreated
A tenant was created; carries its id and its one-time API key.
UserCreated
A user was created; carries the user’s handle (username).
SignedIn
A sign-in succeeded; carries the resolved handle and a session token the client presents to authorise later account actions.
SignupRefused
A signup was refused, with a coarse reason.
Fields
reason: SignupReasonSignInRefused
A sign-in was refused. Coarse by design: it does not say whether the account exists.
UnknownTenant
The API key did not select a known tenant.
ServerError
The server could not process the request (a backend failure). Transient; the request was not applied.
RateLimited
Too many recent failed sign-ins for this identifier, so the credential
check was refused without running. Not an existence oracle: the
counter keys unknown identifiers too (see ratelimit). Back off.
Trait Implementations§
§impl Clone for AccountResponse
impl Clone for AccountResponse
§fn clone(&self) -> AccountResponse
fn clone(&self) -> AccountResponse
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for AccountResponse
Redacts the API key and the session token: a reply in a log line or an
error string must not carry either.
impl Debug for AccountResponse
Redacts the API key and the session token: a reply in a log line or an error string must not carry either.