Enum lu_packets::auth::client::LoginResponse
source · [−]#[non_exhaustive]
#[repr(u8)]
pub enum LoginResponse {
Ok {Show 13 fields
events: (LuString33, LuString33, LuString33, LuString33, LuString33, LuString33, LuString33, LuString33),
version: (u16, u16, u16),
session_key: LuWString33,
redirect_address: (LuString33, u16),
chat_server_address: (LuString33, u16),
cdn_key: LuString33,
cdn_ticket: LuString37,
language: Language,
country_code: LuString3,
just_upgraded_from_ftp: bool,
is_ftp: bool,
time_remaining_in_ftp: u64,
stamps: Vec<Stamp>,
},
CustomMessage(LuVarWString<u16>),
InvalidUsernamePassword,
}
Expand description
Responds to a login request.
Sends session key and redirect address in case of success.
Trigger
Receipt of LoginRequest
.
Handling
If the variant is not Ok
, report the error to the user.
If the variant is Ok
, store the session_key
for later use. Close the connection and open a connection to redirect_address
.
Response
None, close the connection.
Notes
Expect the connection to be closed soon after this message is received, if you’re not closing it yourself already.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Ok
Fields
events: (LuString33, LuString33, LuString33, LuString33, LuString33, LuString33, LuString33, LuString33)
session_key: LuWString33
The session key to be used for authenticating with world servers (to be passed in ClientValidation::session_key
).
redirect_address: (LuString33, u16)
The address of a world server available for further service.
chat_server_address: (LuString33, u16)
The address of the chat server (unused).
cdn_key: LuString33
cdn_ticket: LuString37
language: Language
Language of the server.
country_code: LuString3
Used for the cdclient SubscriptionPricing table.
just_upgraded_from_ftp: bool
Whether the account is connecting as a paid account for the first time.
is_ftp: bool
Whether the account is in free trial mode.
time_remaining_in_ftp: u64
Time remaining in seconds for free-to-play (unused).
The login was successful.
CustomMessage(LuVarWString<u16>)
The login failed in an unusual way. More information can be found in the attached message.
InvalidUsernamePassword
Username or password was incorrect.