Remove legacy token validation field

This commit is contained in:
Edward Shen 2021-07-18 18:32:19 -04:00
parent bd306455bc
commit acd37297fd
Signed by: edward
GPG key ID: 19182661E818369F
2 changed files with 0 additions and 29 deletions

View file

@ -85,8 +85,6 @@ pub struct OkResponse {
pub token_key: Option<String>, pub token_key: Option<String>,
pub compromised: bool, pub compromised: bool,
pub paused: bool, pub paused: bool,
#[serde(default)]
pub force_tokens: bool,
pub tls: Option<Tls>, pub tls: Option<Tls>,
} }
@ -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 { if let Some(tls) = resp.tls {
TLS_PREVIOUSLY_CREATED TLS_PREVIOUSLY_CREATED
.get() .get()

View file

@ -90,20 +90,6 @@ impl ServerState {
info!("This client's URL has been set to {}", resp.url); 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(); let tls = resp.tls.unwrap();
std::mem::drop( std::mem::drop(
TLS_PREVIOUSLY_CREATED.set(ArcSwap::from_pointee(tls.created_at)), TLS_PREVIOUSLY_CREATED.set(ArcSwap::from_pointee(tls.created_at)),