diff options
author | Jesse Luehrs <doy@tozt.net> | 2019-11-27 13:48:55 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2019-11-27 15:19:46 -0500 |
commit | 92bf64ce74050545c96694c8d34202b1546ab390 (patch) | |
tree | bb76a25b57188360274fb5d580f56ffaabd7cc4a /teleterm/src/client.rs | |
parent | 2bb014f580863f28ecbbea68a2b0aeaa815dc8ca (diff) | |
download | teleterm-92bf64ce74050545c96694c8d34202b1546ab390.tar.gz teleterm-92bf64ce74050545c96694c8d34202b1546ab390.zip |
rethink how oauth logins need to work
i can't exchange refresh tokens for access tokens without knowing the
webface oauth configuration either, so this strategy also won't work.
the server actually needs to only receive access tokens, and request the
web server to refresh them as needed.
Diffstat (limited to 'teleterm/src/client.rs')
-rw-r--r-- | teleterm/src/client.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/teleterm/src/client.rs b/teleterm/src/client.rs index 473cb9b..0672811 100644 --- a/teleterm/src/client.rs +++ b/teleterm/src/client.rs @@ -259,7 +259,7 @@ impl<S: tokio::io::AsyncRead + tokio::io::AsyncWrite + Send + 'static> if !self.raw { match msg { - crate::protocol::Message::OauthRequest { url, id } => { + crate::protocol::Message::OauthCliRequest { url, id } => { let mut state = None; let parsed_url = url::Url::parse(&url).unwrap(); for (k, v) in parsed_url.query_pairs() { @@ -373,7 +373,7 @@ impl<S: tokio::io::AsyncRead + tokio::io::AsyncWrite + Send + 'static> return Err(Error::ParseHttpRequestMissingCode); }; Ok(( - crate::protocol::Message::oauth_response_code(&code), + crate::protocol::Message::oauth_cli_response(&code), lines.into_inner().into_inner(), )) }) |