From 55829cd4358766badfd67daa3158503676000d15 Mon Sep 17 00:00:00 2001 From: Simone Cottini Date: Thu, 7 Mar 2024 10:03:14 +0100 Subject: [PATCH] Formatting --- src/auth0/mod.rs | 9 ++++++--- src/auth0/token.rs | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/auth0/mod.rs b/src/auth0/mod.rs index dae4b0a..cd1b737 100644 --- a/src/auth0/mod.rs +++ b/src/auth0/mod.rs @@ -3,8 +3,8 @@ use std::sync::{Arc, RwLock, RwLockReadGuard, RwLockWriteGuard}; use std::time::Duration; -use jwks_client_rs::JwksClient; use jwks_client_rs::source::WebSource; +use jwks_client_rs::JwksClient; use reqwest::Client; use tokio::task::JoinHandle; use tokio::time::Interval; @@ -54,7 +54,7 @@ impl Auth0 { cache.clone(), config, ) - .await; + .await; Ok(Self { token_lock }) } @@ -91,7 +91,10 @@ async fn start( match Token::fetch(&client, &config).await { Ok(token) => { - let is_signed: bool = jwks_client.decode::(token.as_str(), &[config.audience()]).await.is_ok(); + let is_signed: bool = jwks_client + .decode::(token.as_str(), &[config.audience()]) + .await + .is_ok(); tracing::info!("is signed: {}", is_signed); let _ = cache.put_token(&token).await.log_err("Error caching JWT"); diff --git a/src/auth0/token.rs b/src/auth0/token.rs index 3b74197..8b5b87b 100644 --- a/src/auth0/token.rs +++ b/src/auth0/token.rs @@ -136,4 +136,4 @@ impl From<&Config> for FetchTokenRequest { pub struct Claims { #[serde(default)] pub permissions: Vec, -} \ No newline at end of file +}