aboutsummaryrefslogtreecommitdiffstats
path: root/src/actions.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2020-04-12 03:44:48 -0400
committerJesse Luehrs <doy@tozt.net>2020-04-12 03:44:48 -0400
commit201d2d40cac8760fb69b9282ba2a4f9f7ec82d47 (patch)
tree0c1cfd3986e28e7be2b73cdcba11e9ebbbb7c2fa /src/actions.rs
parentbcae263e4e888274f399a75ec5b171ee25edf894 (diff)
downloadrbw-201d2d40cac8760fb69b9282ba2a4f9f7ec82d47.tar.gz
rbw-201d2d40cac8760fb69b9282ba2a4f9f7ec82d47.zip
implement refresh token handling
Diffstat (limited to 'src/actions.rs')
-rw-r--r--src/actions.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/actions.rs b/src/actions.rs
index 7d8569c..c942f32 100644
--- a/src/actions.rs
+++ b/src/actions.rs
@@ -51,3 +51,10 @@ pub async fn sync(
crate::api::Client::new(&config.base_url(), &config.identity_url());
client.sync(access_token).await
}
+
+pub async fn exchange_refresh_token(refresh_token: &str) -> Result<String> {
+ let config = crate::config::Config::load_async().await?;
+ let client =
+ crate::api::Client::new(&config.base_url(), &config.identity_url());
+ client.exchange_refresh_token(refresh_token).await
+}