diff options
Diffstat (limited to 'src/login')
-rw-r--r-- | src/login/static_provider.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/login/static_provider.rs b/src/login/static_provider.rs index aa5e499..6bbc717 100644 --- a/src/login/static_provider.rs +++ b/src/login/static_provider.rs @@ -48,14 +48,18 @@ impl StaticLoginProvider { #[async_trait] impl LoginProvider for StaticLoginProvider { async fn login(&self, username: &str, password: &str) -> Result<Credentials> { + tracing::debug!(user=%username, "login"); let user = match self.users.get(username) { None => bail!("User {} does not exist", username), Some(u) => u, }; + tracing::debug!(user=%username, "verify password"); if !verify_password(password, &user.password)? { bail!("Wrong password"); } + + tracing::debug!(user=%username, "fetch bucket"); let bucket = user .bucket .clone() @@ -64,6 +68,7 @@ impl LoginProvider for StaticLoginProvider { "No bucket configured and no default bucket specieid" ))?; + tracing::debug!(user=%username, "fetch keys"); let storage = StorageCredentials { k2v_region: self.k2v_region.clone(), s3_region: self.s3_region.clone(), @@ -92,6 +97,7 @@ impl LoginProvider for StaticLoginProvider { ), }; + tracing::debug!(user=%username, "logged"); Ok(Credentials { storage, keys }) } |