diff --git a/warpgate-common/src/config_providers/file.rs b/warpgate-common/src/config_providers/file.rs index e3590a6..27a57d6 100644 --- a/warpgate-common/src/config_providers/file.rs +++ b/warpgate-common/src/config_providers/file.rs @@ -186,11 +186,13 @@ impl ConfigProvider for FileConfigProvider { return Ok(AuthResult::Rejected); } } - None => { - return Ok(AuthResult::Accepted { + None => Ok(if !valid_credentials.is_empty() { + AuthResult::Accepted { username: user.username.clone(), - }) - } + } + } else { + AuthResult::Rejected + }), } }