From acd37297fdd65ad0163a83cd3e2312c7eed6963f Mon Sep 17 00:00:00 2001 From: Edward Shen Date: Sun, 18 Jul 2021 18:32:19 -0400 Subject: [PATCH] Remove legacy token validation field --- src/ping.rs | 15 --------------- src/state.rs | 14 -------------- 2 files changed, 29 deletions(-) diff --git a/src/ping.rs b/src/ping.rs index 1e7db13..b197e06 100644 --- a/src/ping.rs +++ b/src/ping.rs @@ -85,8 +85,6 @@ pub struct OkResponse { pub token_key: Option, pub compromised: bool, pub paused: bool, - #[serde(default)] - pub force_tokens: bool, pub tls: Option, } @@ -209,19 +207,6 @@ pub async fn update_server_state( } } - if !cli - .unstable_options - .contains(&UnstableOptions::DisableTokenValidation) - && VALIDATE_TOKENS.load(Ordering::Acquire) != resp.force_tokens - { - if resp.force_tokens { - info!("Client received command to enforce token validity."); - } else { - info!("Client received command to no longer enforce token validity"); - } - VALIDATE_TOKENS.store(resp.force_tokens, Ordering::Release); - } - if let Some(tls) = resp.tls { TLS_PREVIOUSLY_CREATED .get() diff --git a/src/state.rs b/src/state.rs index ccec3b5..7d896b3 100644 --- a/src/state.rs +++ b/src/state.rs @@ -90,20 +90,6 @@ impl ServerState { info!("This client's URL has been set to {}", resp.url); - if config - .unstable_options - .contains(&UnstableOptions::DisableTokenValidation) - { - warn!("Token validation is explicitly disabled!"); - } else { - if resp.force_tokens { - info!("This client will validate tokens."); - } else { - info!("This client will not validate tokens."); - } - VALIDATE_TOKENS.store(resp.force_tokens, Ordering::Release); - } - let tls = resp.tls.unwrap(); std::mem::drop( TLS_PREVIOUSLY_CREATED.set(ArcSwap::from_pointee(tls.created_at)),