()
| 261 | use std::collections::HashMap; |
| 262 | |
| 263 | fn test_auth() -> AuthContext { |
| 264 | AuthContext { |
| 265 | id: "42".into(), |
| 266 | username: "alice".into(), |
| 267 | email: None, |
| 268 | tenant_id: crate::types::TenantId::new(1), |
| 269 | org_id: None, |
| 270 | org_ids: Vec::new(), |
| 271 | roles: vec!["readwrite".into()], |
| 272 | groups: Vec::new(), |
| 273 | permissions: Vec::new(), |
| 274 | status: super::super::auth_context::AuthStatus::Active, |
| 275 | metadata: HashMap::new(), |
| 276 | auth_method: super::super::identity::AuthMethod::ApiKey, |
| 277 | auth_time: Some( |
| 278 | std::time::SystemTime::now() |
| 279 | .duration_since(std::time::UNIX_EPOCH) |
| 280 | .unwrap() |
| 281 | .as_secs(), |
| 282 | ), |
| 283 | session_id: "test".into(), |
| 284 | on_deny_override: None, |
| 285 | database_id: None, |
| 286 | } |
| 287 | } |
| 288 | |
| 289 | #[test] |
| 290 | fn mfa_required_passes() { |
no test coverage detected