#[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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.

Ok

Fields

version: (u16, u16, u16)

Used for version gating.

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).

stamps: Vec<Stamp>

Logs from the auth server.

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.

Trait Implementations

Formats the value using the given formatter. Read more
Deserializes the type by reading from the reader.
Converts to this type from the input type.
Converts to this type from the input type.
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
Serializes the type by writing to the writer.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.