Struct matrix_sdk::LoginBuilder
source · [−]pub struct LoginBuilder<'a> { /* private fields */ }
Expand description
Builder type used to configure optional settings for logging in with a username or token.
Created with Client::login_username
or Client::login_token
.
Finalized with .send()
.
Implementations
sourceimpl<'a> LoginBuilder<'a>
impl<'a> LoginBuilder<'a>
sourcepub fn device_id(self, value: &'a str) -> Self
pub fn device_id(self, value: &'a str) -> Self
Set the device ID.
The device ID is a unique ID that will be associated with this session. If not set, the homeserver will create one. Can be an existing device ID from a previous login call. Note that this should be done only if the client also holds the corresponding encryption keys.
sourcepub fn initial_device_display_name(self, value: &'a str) -> Self
pub fn initial_device_display_name(self, value: &'a str) -> Self
Set the initial device display name.
The device display name is the public name that will be associated with the device ID. Only necessary the first time you login with this device ID. It can be changed later.
sourcepub fn request_refresh_token(self) -> Self
pub fn request_refresh_token(self) -> Self
Advertise support for refreshing access tokens.
By default, the Client
won’t handle refreshing access tokens, so
Client::refresh_access_token()
needs to be called manually.
This behavior can be changed by calling
handle_refresh_tokens()
when building the Client
.
Note that refreshing access tokens might not be supported or might be enforced by the homeserver regardless of this setting.