Add a way to log out

This commit is contained in:
Elias Projahn 2021-02-07 00:43:59 +01:00
parent 67fad1329d
commit 5b066a05b6
6 changed files with 126 additions and 35 deletions

View file

@ -65,8 +65,8 @@ impl Client {
}
/// Set the user credentials to use.
pub fn set_login_data(&self, data: LoginData) {
self.login_data.replace(Some(data));
pub fn set_login_data(&self, data: Option<LoginData>) {
self.login_data.replace(data);
self.token.replace(None);
}