mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-06 01:11:54 +00:00
moar better error handling
This commit is contained in:
parent
1192b1b422
commit
5095d73de3
@ -158,14 +158,14 @@ impl ZeroIDC {
|
|||||||
.request(http_client);
|
.request(http_client);
|
||||||
|
|
||||||
res
|
res
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if let Some(res) = token_response {
|
if let Some(res) = token_response {
|
||||||
if let Ok(res) = res {
|
match res {
|
||||||
let id_token = res.id_token();
|
Ok(res) => {
|
||||||
|
match res.id_token() {
|
||||||
|
Some(id_token) => {
|
||||||
|
|
||||||
if let Some(id_token) = id_token {
|
|
||||||
let params = [("id_token", id_token.to_string()),("state", "refresh".to_string())];
|
let params = [("id_token", id_token.to_string()),("state", "refresh".to_string())];
|
||||||
let client = reqwest::blocking::Client::new();
|
let client = reqwest::blocking::Client::new();
|
||||||
let r = client.post((*inner_local.lock().unwrap()).auth_endpoint.clone())
|
let r = client.post((*inner_local.lock().unwrap()).auth_endpoint.clone())
|
||||||
@ -209,6 +209,14 @@ impl ZeroIDC {
|
|||||||
(*inner_local.lock().unwrap()).running = false;
|
(*inner_local.lock().unwrap()).running = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
None => {
|
||||||
|
println!("No id token???");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
Err(e) => {
|
||||||
|
println!("Error posting refresh token: {}", e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user