aboutsummaryrefslogtreecommitdiffstats
path: root/teleterm/src/oauth.rs
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-11-27 11:29:09 -0500
committerJesse Luehrs <doy@tozt.net>2019-11-27 11:29:09 -0500
commita7ebc62a80933a73eae2282827e74dfaeb107820 (patch)
treeab3c9972f36926e67961eb09e23a700cba7479c2 /teleterm/src/oauth.rs
parenta7b13be27b7398c84296ef82ba60b7a441a3fb0f (diff)
downloadteleterm-a7ebc62a80933a73eae2282827e74dfaeb107820.tar.gz
teleterm-a7ebc62a80933a73eae2282827e74dfaeb107820.zip
calculate the redirect_url for web oauth too
a bit more complicated because it needs to use the configured public_address, etc
Diffstat (limited to 'teleterm/src/oauth.rs')
-rw-r--r--teleterm/src/oauth.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/teleterm/src/oauth.rs b/teleterm/src/oauth.rs
index 5283957..4e4ad72 100644
--- a/teleterm/src/oauth.rs
+++ b/teleterm/src/oauth.rs
@@ -145,6 +145,10 @@ pub struct Config {
}
impl Config {
+ pub fn set_redirect_url(&mut self, url: url::Url) {
+ self.redirect_url = url;
+ }
+
fn into_basic_client(self) -> oauth2::basic::BasicClient {
oauth2::basic::BasicClient::new(
oauth2::ClientId::new(self.client_id),